Project

General

Profile

Backport #3570

Time#zone doesn't work properly in some cases on Windows

Added by phasis68 (Heesob Park) about 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:31275]

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

Associated revisions

Revision e9faf5ff
Added by yugui (Yuki Sonoda) about 8 years ago

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 31854
Added by yugui (Yuki Sonoda) about 8 years ago

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]

History

#1

Updated by usa (Usaku NAKAMURA) about 9 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

#2

Updated by akr (Akira Tanaka) about 9 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

#3

Updated by phasis68 (Heesob Park) almost 9 years ago

=begin
This bug still exists in ruby 1.9.2p0.

I think changeset r28643 should be backported.
=end

#4

Updated by yugui (Yuki Sonoda) over 8 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from akr (Akira Tanaka) to yugui (Yuki Sonoda)

=begin

=end

#5

Updated by yugui (Yuki Sonoda) about 8 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]

Also available in: Atom PDF