Project

General

Profile

Actions

Bug #14438

closed

TestTimeTZ: failures with recent version of tzdata

Bug #14438: TestTimeTZ: failures with recent version of tzdata

Added by terceiro (Antonio Terceiro) almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-02-04 master 62196) [x86_64-linux]
[ruby-core:85373]

Description

This has beeen reported in Debian as Debian bug #889046

Recent tzdata has fixed some definitions about the Japan timezone in the 50s:

http://mm.icann.org/pipermail/tz-announce/2018-January/000048.html

Changes to past time stamps

Japanese DST transitions (1948-1951) were Sundays at 00:00, not
Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.)

With this update, existing Ruby tests fail:

$ make test-all TESTS=test/ruby/test_time_tz.rb Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=./test/excludes --name=!/memory_leak/ # Running tests: [ 4/108] TestTimeTZ#test_asia_tokyo = 0.00 s 1) Failure: TestTimeTZ#test_asia_tokyo [/home/terceiro/src/ruby/test/ruby/test_time_tz.rb:129]: TZ=Asia/Tokyo Time.local(1951, 5, 6, 2, 0, 0). <"1951-05-06 03:00:00 +1000"> expected but was <"1951-05-06 02:00:00 +1000">. [ 62/108] TestTimeTZ#test_gen_Asia_Tokyo_24 = 0.00 s 2) Failure: TestTimeTZ#test_gen_Asia_Tokyo_24 [/home/terceiro/src/ruby/test/ruby/test_time_tz.rb:259]: TZ=Asia/Tokyo Time.utc(1951, 5, 5, 16, 59, 59).localtime. <"1951-05-06 01:59:59 +0900"> expected but was <"1951-05-06 02:59:59 +1000">. [ 65/108] TestTimeTZ#test_gen_Asia_Tokyo_27 = 0.00 s 3) Failure: TestTimeTZ#test_gen_Asia_Tokyo_27 [/home/terceiro/src/ruby/test/ruby/test_time_tz.rb:259]: TZ=Asia/Tokyo Time.utc(1951, 9, 7, 16, 0, 0).localtime. <"1951-09-08 01:00:00 +0900"> expected but was <"1951-09-08 02:00:00 +1000">. [ 66/108] TestTimeTZ#test_gen_Asia_Tokyo_69 = 0.00 s 4) Failure: TestTimeTZ#test_gen_Asia_Tokyo_69 [/home/terceiro/src/ruby/test/ruby/test_time_tz.rb:277]: TZ=Asia/Tokyo Time.local(1951, 5, 6, 1, 59, 59). <"1951-05-06 01:59:59 +0900"> expected but was <"1951-05-06 01:59:59 +1000">. [ 69/108] TestTimeTZ#test_gen_Asia_Tokyo_72 = 0.00 s 5) Failure: TestTimeTZ#test_gen_Asia_Tokyo_72 [/home/terceiro/src/ruby/test/ruby/test_time_tz.rb:295]: TZ=Asia/Tokyo Time.local(0, 0, 1, 8, 9, 1951, nil, nil, false, nil). <"1951-09-08 01:00:00 +0900"> expected but was <"1951-09-08 01:00:00 +1000">. Finished tests in 0.028324s, 3813.0025 tests/s, 35164.3559 assertions/s. 108 tests, 996 assertions, 5 failures, 0 errors, 0 skips ruby -v: ruby 2.6.0dev (2018-02-04 master 62196) [x86_64-linux] uncommon.mk:699: recipe for target 'yes-test-all' failed make: *** [yes-test-all] Error 5 

Related issues 1 (0 open1 closed)

Updated by vo.x (Vit Ondruch) over 7 years ago Actions #1

  • Has duplicate Bug #14477: tzdata 2018c seems break test suite added

Updated by shyouhei (Shyouhei Urabe) over 7 years ago Actions #2 [ruby-core:85589]

So this is a test which checks if ruby can understand real-world timezone glitches. And the reality changed. I think we should consider this test being invalid now.

Updated by nobu (Nobuyoshi Nakada) over 7 years ago Actions #3 [ruby-core:85590]

Just a note: this is caused by a tzdata bugfix reported at http://mm.icann.org/pipermail/tz/2018-January/025896.html.

Updated by nobu (Nobuyoshi Nakada) over 7 years ago Actions #4

  • Status changed from Open to Closed

Applied in changeset trunk|r62506.


test_time_tz.rb: past Japanese DST tzdata fix

  • test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow
    the tzdata 2018 fix of Japanese DST transitions (1948-1951).
    [ruby-core:85373] [Bug #14438]

Updated by nobu (Nobuyoshi Nakada) over 7 years ago Actions #5

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED

Updated by naruse (Yui NARUSE) over 7 years ago Actions #6 [ruby-core:85859]

  • Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE

ruby_2_5 r62609 merged revision(s) 62506,62508.

Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago Actions #7 [ruby-core:85891]

  • Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE to 2.3: REQUIRED, 2.4: DONE, 2.5: DONE

ruby_2_4 r62634 merged revision(s) 62506,62508.

Updated by usa (Usaku NAKAMURA) over 7 years ago Actions #8 [ruby-core:86175]

  • Backport changed from 2.3: REQUIRED, 2.4: DONE, 2.5: DONE to 2.3: DONE, 2.4: DONE, 2.5: DONE

ruby_2_3 r62808 merged revision(s) 62506,62508.

Actions

Also available in: PDF Atom