diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-04 15:51:05 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-04 15:51:05 +0000 |
commit | 0b53b86d470da1933ef85ba0891c397901702fe3 (patch) | |
tree | 9e19fd59ae7012d435823a8c443e42c12b7f7dde /lib | |
parent | 40c6eaf6d8b5cda6733b8a904f1f04a64aa7d101 (diff) | |
download | ruby-0b53b86d470da1933ef85ba0891c397901702fe3.tar.gz |
add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/time.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/time.rb b/lib/time.rb index f080718dff..387df1f298 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -178,8 +178,12 @@ class Time if zone_utc?(zone) t.utc elsif offset ||= zone_offset(zone) + # Prefer the local (real) timezone over the fixed offset (artificial) + # timezone. t.localtime if t.utc_offset != offset + # Use the fixed offset timezone only if the local timezone cannot + # represent the given offset. t.localtime(offset) end else |