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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0