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

No one knows how many leap seconds in year 2100

Just check whether leep seconds are considered or not.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2018-07-16 14:43:38 +00:00
parent abb7438849
commit 2af66d34f7

View file

@ -233,13 +233,13 @@ class TestTimeTZ < Test::Unit::TestCase
}
with_tz("right/UTC") {
::Bug::Time.reset_leap_second_info
assert_equal(4102444827, Time.utc(2100,1,1,0,0,0).to_i)
assert_not_equal(4102444800, Time.utc(2100,1,1,0,0,0).to_i)
with_tz(tz="UTC") {
assert_time_constructor(tz, "2008-12-31 23:59:59 UTC", :utc, [2008,12,31,23,59,59])
assert_time_constructor(tz, "2009-01-01 00:00:00 UTC", :utc, [2008,12,31,23,59,60])
assert_time_constructor(tz, "2009-01-01 00:00:00 UTC", :utc, [2008,12,31,24,0,0])
assert_time_constructor(tz, "2009-01-01 00:00:00 UTC", :utc, [2009,1,1,0,0,0])
assert_equal(4102444827, Time.utc(2100,1,1,0,0,0).to_i)
assert_not_equal(4102444800, Time.utc(2100,1,1,0,0,0).to_i)
}
}
end if has_right_tz