Bug 1141775 - Update fo tzdata breaks Ruby's test suite
Summary: Update fo tzdata breaks Ruby's test suite
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tzdata
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Patsy Griffin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-15 12:31 UTC by Vít Ondruch
Modified: 2014-09-16 05:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-16 05:50:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ruby 10245 0 None None None Never

Description Vít Ondruch 2014-09-15 12:31:04 UTC
Description of problem:
tzdata-2014g-1.fc22 breaks Ruby's test suite:

[ 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">.



Version-Release number of selected component (if applicable):
$ rpm -q tzdata
tzdata-2014g-1.fc22.noarch


How reproducible:
Always

Steps to Reproduce:
1. make test-all TESTS=test/ruby/test_time_tz.rb
2.
3.

Actual results:
It fails

Expected results:
It should pass

Additional info:
When I downgrade to tzdata-2014f-1.fc22.noarch.rpm, the test is passing just fine. Not sure what was changes. May be tzdata are now more precise and Ruby should be fixed? Not sure ...

Comment 1 Petr Machata 2014-09-15 17:17:12 UTC
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.

Comment 2 Vít Ondruch 2014-09-16 05:50:37 UTC
Thank you for the explanation. I opened upstream ticket to resolve this issue:

https://bugs.ruby-lang.org/issues/10245

For the reference, this is the test:

https://github.com/ruby/ruby/blob/trunk/test/ruby/test_time_tz.rb#L359

I'm closing this for now and will be back in case of some uncertainties. Thanks for your help.


Note You need to log in before you can comment on or make changes to this bug.