nilcons / haskell-tz

Haskell package shipping the standard time zone database & library to use with it
Apache License 2.0
16 stars 13 forks source link

incompatibility with 'slim` /usr/share/zoneinfo format #26

Open trofi opened 4 years ago

trofi commented 4 years ago

On a system with sys-libs/timezone-data-2020b and above timezone tests fail as:

Test suite logged to: dist/test/tz-0.1.3.5-th-test.log
Test suite testsSys: RUNNING...
Main:
  Budapest correct TimeZone: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 65, srcLocStartCol = 13, srcLocEndLine = 65, srcLocEndCol = 48})) (ExpectedButGot Nothing "CET" "CEST")' (after 16 tests):
(used seed 373177944295650250)
  New York correct TimeZone: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 65, srcLocStartCol = 13, srcLocEndLine = 65, srcLocEndCol = 48})) (ExpectedButGot Nothing "EST" "EDT")' (after 8 tests):
(used seed -6698765111005426216)
  Los Angeles correct TimeZone: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 65, srcLocStartCol = 13, srcLocEndLine = 65, srcLocEndCol = 48})) (ExpectedButGot Nothing "PST" "PDT")' (after 5 tests):
(used seed -2318792879736774576)
  Shanghai correct TimeZone: [OK, passed 100 tests]
  Jerusalem correct TimeZone: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 65, srcLocStartCol = 13, srcLocEndLine = 65, srcLocEndCol = 48})) (ExpectedButGot Nothing "IST" "IDT")' (after 49 tests):
(used seed -386169573243891044)
  Antarctica Palmer correct TimeZone: [OK, passed 100 tests]
  Melbourne correct TimeZone: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 65, srcLocStartCol = 13, srcLocEndLine = 65, srcLocEndCol = 48})) (ExpectedButGot Nothing "AEDT" "AEST")' (after 15 tests):
(used seed -1326492299289746028)
  Budapest correct LocalTime: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 92, srcLocStartCol = 13, srcLocEndLine = 92, srcLocEndCol = 76})) (ExpectedButGot Nothing "1996-10-27 02:00:00" "1996-10-27 03:00:00")' (after 62 tests and 14 shrinks):
846378000
(used seed -5776371655142200096)
  New York correct LocalTime: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 92, srcLocStartCol = 13, srcLocEndLine = 92, srcLocEndCol = 76})) (ExpectedButGot Nothing "2009-11-01 01:00:00" "2009-11-01 02:00:00")' (after 84 tests and 22 shrinks):
1257055200
(used seed 206784595925771598)
  Los Angeles correct LocalTime: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 92, srcLocStartCol = 13, srcLocEndLine = 92, srcLocEndCol = 76})) (ExpectedButGot Nothing "2008-11-02 01:00:00" "2008-11-02 02:00:00")' (after 86 tests and 12 shrinks):
1225616400
(used seed 2558864323799544892)
  Shanghai correct LocalTime: [OK, passed 100 tests]
  Jerusalem correct LocalTime: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 92, srcLocStartCol = 13, srcLocEndLine = 92, srcLocEndCol = 76})) (ExpectedButGot Nothing "2013-10-27 01:00:00" "2013-10-27 02:00:00")' (after 65 tests and 13 shrinks):
1382828400
(used seed -3609122477262445018)
  Antarctica Palmer correct LocalTime: [OK, passed 100 tests]
  Melbourne correct LocalTime: [Failed]
*** Failed! Exception: 'HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Main", srcLocFile = "tests/testTZSys.hs", srcLocStartLine = 92, srcLocStartCol = 13, srcLocEndLine = 92, srcLocEndCol = 76})) (ExpectedButGot Nothing "2008-10-05 03:00:00" "2008-10-05 02:00:00")' (after 69 tests and 17 shrinks):
1223136000
(used seed 1551956221667884141)

         Properties   Total
 Passed  4            4
 Failed  10           10
 Total   14           14
Test suite testsSys: FAIL
trofi commented 4 years ago

It happens doe to the following change https://data.iana.org/time-zones/tzdb/NEWS:

Release 2020b - 2020-10-06 18:35:04 -0700
...
    zic now defaults to '-b slim' instead of to '-b fat'.
klao commented 4 years ago

Thank you for the report! I am aware of this and working on a fix.