Backport #3570
closedTime#zone doesn't work properly in some cases on Windows
Description
=begin
Time.now.zone
=> "\xB4\xEB\xC7\xD1\xB9\xCE\xB1\xB9 \xC7\xA5\xC1\xD8\xBD\xC3"
Time.local(1900).zone
=> "UTC"
Time.local(1970).zone
=> "UTC"
Time.local(1971).zone
=> "\xB4\xEB\xC7\xD1\xB9\xCE\xB1\xB9 \xC7\xA5\xC1\xD8\xBD\xC3"
Time.local(3000).zone
=> "\xB4\xEB\xC7\xD1\xB9\xCE\xB1\xB9 \xC7\xA5\xC1\xD8\xBD\xC3"
Time.local(3001).zone
=> "\xB4\xEB\xC7\xD1\xB9\xCE\xB1\xB9 \xC7\xA5\xC1\xD8\xBD\xC3"
Time.local(3002).zone
=> "UTC"
Time.local(3100).zone
=> "UTC"
=end
Updated by usa (Usaku NAKAMURA) almost 14 years ago
- Status changed from Open to Assigned
- Assignee set to akr (Akira Tanaka)
=begin
This problem doesn't seem Windows only.
Time#zone returns UTC if the time is out of range of C runtime support.
=end
Updated by akr (Akira Tanaka) almost 14 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r28643.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by phasis68 (Heesob Park) over 13 years ago
=begin
This bug still exists in ruby 1.9.2p0.
I think changeset r28643 should be backported.
=end
Updated by yugui (Yuki Sonoda) over 13 years ago
- Status changed from Closed to Assigned
- Assignee changed from akr (Akira Tanaka) to yugui (Yuki Sonoda)
=begin
=end
Updated by yugui (Yuki Sonoda) almost 13 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r31854.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merges r28643 from trunk into ruby_1_9_2. Fixes #3570.¶
- time.c (localtime_with_gmtoff_zone): renamed from
localtime_with_gmtoff and return the timezone abbreviation name.
(guess_local_offset): return the isdst and timezone abbreviation name.
(localtimew): use the returned isdst and timezone abbreviation name.
[ruby-core:31275]