summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-03 18:27:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-03 18:27:21 +0000
commit7a39fcc19527cf6ac63d7c760c292fab96053244 (patch)
tree73041ae236d806ec7e1a82ee37c9bebb81268d5f /lib
parentaf56a2b6dc790170bc0876d09c0287832a14a5b7 (diff)
* lib/time.rb (Time.make_time): Refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/time.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/time.rb b/lib/time.rb
index cb37c4e562..9d4e9cccba 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -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)