method
make_time
make_time(year, mon, day, hour, min, sec, sec_fraction, zone, now)
private
Hide source
# File lib/time.rb, line 231 def make_time(year, mon, day, hour, min, sec, sec_fraction, zone, now) usec = nil usec = sec_fraction * 1000000 if sec_fraction if now begin break if year; year = now.year break if mon; mon = now.mon break if day; day = now.day break if hour; hour = now.hour break if min; min = now.min break if sec; sec = now.sec break if sec_fraction; usec = now.tv_usec end until true end year ||= 1970 mon ||= 1 day ||= 1 hour ||= 0 min ||= 0 sec ||= 0 usec ||= 0 off = nil off = zone_offset(zone, year) if zone if off year, mon, day, hour, min, sec = apply_offset(year, mon, day, hour, min, sec, off) t = self.utc(year, mon, day, hour, min, sec, usec) t.localtime if !zone_utc?(zone) t else self.local(year, mon, day, hour, min, sec, usec) end end