Project

General

Profile

Actions

Bug #19187

closed

Ruby 3.1.3 testsuite fails after timezone 2022g update is applied

Added by coolo (Stephan Kulow) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux-gnu]
[ruby-core:111220]

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.

  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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0