Bug #19187
closedRuby 3.1.3 testsuite fails after timezone 2022g update is applied
Description
The timezone database changed incompatible to what ruby's testsuite expects.
See the announcement here: http://mm.icann.org/pipermail/tz-announce/2022-November/000076.html and note the little detail
Singapore's 1981-12-31 change was at 16:00 UTC (23:30 local time),
not 24:00 local time. (Thanks to Geoff Clare via Robert Elz.)
Problem is that test/ruby/test_time_tz.rb tests this very detail in 3 places - and breaks.
-
Failure:
TestTimeTZ#test_asia_singapore [/home/abuild/rpmbuild/BUILD/ruby-3.1.3/test/ruby/test_time_tz.rb:143]:
TZ=Asia/Singapore Time.local(1981, 12, 31, 23, 59, 59).
<"1981-12-31 23:59:59 +0730"> expected but was
<"1982-01-01 00:29:59 +0800">. -
Failure:
TestTimeTZ#test_gen_Asia_Singapore_22 [/home/abuild/rpmbuild/BUILD/ruby-3.1.3/test/ruby/test_time_tz.rb:382]:
TZ=Asia/Singapore Time.utc(1981, 12, 31, 16, 29, 59).localtime.
<"1981-12-31 23:59:59 +0730"> expected but was
<"1982-01-01 00:29:59 +0800">. -
Failure:
TestTimeTZ#test_gen_Asia_Singapore_45 [/home/abuild/rpmbuild/BUILD/ruby-3.1.3/test/ruby/test_time_tz.rb:400]:
TZ=Asia/Singapore Time.local(1981, 12, 31, 23, 59, 59).
<"1981-12-31 23:59:59 +0730"> expected but was
<"1982-01-01 00:29:59 +0800">.
I can see no other option than not to test this detail - because relying on correct timezone data (either way) is barely possible.