
Issue #19187 has been updated by mame (Yusuke Endoh). I disagree with simply erasing the tests depending on tzdata. We need to test our logic to handle leap seconds, etc. If we remove the dependency on tzdata, I think we need to mock tzdata and test our logic. But we don't have to go that far. I think using tzdata is good enough. Following changes in tzdata is a bit annoying, but I don't think it's happening so frequently. ---------------------------------------- Bug #19187: Ruby 3.1.3 testsuite fails after timezone 2022g update is applied https://bugs.ruby-lang.org/issues/19187#change-100753 * Author: coolo (Stephan Kulow) * Status: Closed * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux-gnu] * Backport: 2.7: DONE, 3.0: DONE, 3.1: DONE ---------------------------------------- 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. 1) 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">. 2) 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">. 3) 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. -- https://bugs.ruby-lang.org/