mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
40c6eaf6d8
commit
0b53b86d47
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue