Backport #3570
closed
Time#zone doesn't work properly in some cases on Windows
Added by phasis68 (Heesob Park) almost 14 years ago.
Updated almost 13 years ago.
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
- 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
- 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
=begin
This bug still exists in ruby 1.9.2p0.
I think changeset r28643 should be backported.
=end
- Status changed from Closed to Assigned
- Assignee changed from akr (Akira Tanaka) to yugui (Yuki Sonoda)
- 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]
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0