Project

General

Profile

Actions

Bug #10245

closed

TestTimeTZ#test_gen_Europe_Lisbon_111 fails with recent tzdata

Added by vo.x (Vit Ondruch) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-09-15 trunk 47594) [x86_64-linux]
[ruby-core:65058]

Description

In Fedora, tzdata were recently updated to tzdata-2014g-1.fc22 [1]. Since that update, one test case fails:

$ make test-all TESTS=test/ruby/test_time_tz.rb
...
snip
...

[ 79/123] TestTimeTZ#test_gen_Europe_Lisbon_111 = 0.00 s             
  1) Failure:
TestTimeTZ#test_gen_Europe_Lisbon_111 [/builddir/build/BUILD/ruby-2.2.0-r47594/test/ruby/test_time_tz.rb:250]:
TZ=Europe/Lisbon Time.utc(1912, 1, 1, 0, 36, 31).localtime.
<"1911-12-31 23:59:59 -0036"> expected but was
<"1911-12-31 23:59:46 -0036">.

This is what Red Hat's tzdata maintainer says about that change [2]:

tl;dr: Ruby will have to fix its test suite.

I expect that this comes from Ruby-internal test suite that expects Europe/Lisbon on some offset, and is surprised that it's actually a couple seconds off. But that far back, time didn't use to be split to zones like today, and every location kept its own local time. I think that most stamps in zoneinfo were calculated from GMT coordinates of the city (which itself is a somewhat fuzzy notion), and are corrected based on historical sources only retroactively, when someone gets to it, or when someone complains. That's what happened here--Paul Eggert got to Lisbon.

It seems like Europe/Brussels might be a good choice for this sort of test, because it's local mean time has been based on an official document since 1997.

Could you please make the test case compatible with recent tzdata? Thanks.

[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=576705
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1141775

Updated by vo.x (Vit Ondruch) over 9 years ago

BTW I have not tested it, but I'd expect that this is issue for all currently supported Ruby releases.

Updated by akr (Akira Tanaka) over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r47680.


  • test/ruby/test_time_tz.rb: Fix test error with tzdata-2014g.
    [ruby-core:65058] [Bug #10245] Reported by Vit Ondruch.

Updated by akr (Akira Tanaka) over 9 years ago

I committed a fix r47680.

It still test Europe/Lisbon because I'd like to test
an situation that gmtoff is not a multiples of 60 seconds.

Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

r47111, r47212, r47451, r47452 and r47680 were backported into ruby_2_1 branch at r47700.

Updated by vo.x (Vit Ondruch) over 9 years ago

  • Status changed from Closed to Open
  • Assignee set to akr (Akira Tanaka)

Sorry but it does not work for me. However, the error is now different:

  1) Failure:
TestTimeTZ#test_gen_lisbon_111 [/builddir/build/BUILD/ruby-2.2.0-r47902/test/ruby/test_time_tz.rb:396]:
Expected [] to include [true, true, true, true, true].

Updated by vo.x (Vit Ondruch) over 9 years ago

  • Status changed from Open to Closed

Ups, sorry. That was my fault. I forgot to remove one piece of workaround I applied before. Sorry for the noise.

Updated by usa (Usaku NAKAMURA) over 9 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

Backported into ruby_2_0_0 at r47937.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0