1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* time.c (guess_local_offset): use the UTC offset of an older date on

64bit time_t environment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-07-14 21:05:00 +00:00
parent 8742248884
commit b782aea75f
3 changed files with 20 additions and 3 deletions

View file

@ -80,7 +80,6 @@ class TestTimeTZ < Test::Unit::TestCase
with_tz(tz="America/Los_Angeles") {
assert_time_constructor(tz, "2007-03-11 03:00:00 -0700", :local, [2007,3,11,2,0,0])
assert_time_constructor(tz, "2007-03-11 03:59:59 -0700", :local, [2007,3,11,2,59,59])
#assert_equal("PST", Time.new(-0x1_0000_0000_0000_0000).zone)
assert_equal("PST", Time.new(0x1_0000_0000_0000_0000, 1).zone)
assert_equal("PDT", Time.new(0x1_0000_0000_0000_0000, 8).zone)
assert_equal(false, Time.new(0x1_0000_0000_0000_0000, 1).isdst)
@ -136,6 +135,12 @@ class TestTimeTZ < Test::Unit::TestCase
}
end
def test_europe_lisbon
with_tz(tz="Europe/Lisbon") {
assert_equal("LMT", Time.new(-0x1_0000_0000_0000_0000).zone)
}
end
def test_europe_moscow
with_tz(tz="Europe/Moscow") {
assert_time_constructor(tz, "1992-03-29 00:00:00 +0400", :local, [1992,3,28,23,0,0])