* lib/time.rb (Time.make_time): Refactored.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-05-03 18:27:21 +00:00
parent af56a2b6dc
commit 7a39fcc195
2 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1,7 @@
Sun May 4 03:26:39 2014 Tanaka Akira <akr@fsij.org>
* lib/time.rb (Time.make_time): Refactored.
Sun May 4 02:53:17 2014 Tanaka Akira <akr@fsij.org>
* lib/time.rb (Time.rfc2822): Fix year completion.

View File

@ -258,11 +258,7 @@ class Time
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)
if zone_utc?(zone)
t.utc
else
t.localtime(off)
end
t.localtime(off) if !zone_utc?(zone)
t
else
self.local(year, mon, day, hour, min, sec, usec)