houseabsolute / DateTime-TimeZone

Time zone object base class and factory
https://metacpan.org/release/DateTime-TimeZone/
Other
9 stars 25 forks source link

Parsing of the America/Ojinaga zone in IANA db 2022g is broken #52

Closed autarch closed 1 year ago

autarch commented 1 year ago

The generated zdump tests fail:

t/zd_America-Ojinaga.t .. 78/18270 
#   Failed test 'local hour should be 3 (2022-10-30 03:00:00)'
#   at t/zd_America-Ojinaga.t line 2159.
#          got: '2'
#     expected: '3'

#   Failed test 'is_dst should be 1 (2022-10-30 03:00:00)'
#   at t/zd_America-Ojinaga.t line 2163.
#          got: '0'
#     expected: '1'

#   Failed test 'offset should be -18000 (2022-10-30 03:00:00)'
#   at t/zd_America-Ojinaga.t line 2164.
#          got: '-21600'
#     expected: '-18000'

#   Failed test 'short name should be CDT (2022-10-30 03:00:00)'
#   at t/zd_America-Ojinaga.t line 2165.
#          got: 'CST'
#     expected: 'CDT'

#   Failed test 'local hour should be 1 (2022-11-06 01:59:59)'
#   at t/zd_America-Ojinaga.t line 2177.
#          got: '0'
#     expected: '1'

#   Failed test 'is_dst should be 1 (2022-11-06 01:59:59)'
#   at t/zd_America-Ojinaga.t line 2181.
#          got: '0'
#     expected: '1'

#   Failed test 'offset should be -18000 (2022-11-06 01:59:59)'
#   at t/zd_America-Ojinaga.t line 2182.
#          got: '-21600'
#     expected: '-18000'

#   Failed test 'short name should be CDT (2022-11-06 01:59:59)'
#   at t/zd_America-Ojinaga.t line 2183.
#          got: 'CST'
#     expected: 'CDT'
t/zd_America-Ojinaga.t .. 12224/18270 # Looks like you failed 8 tests of 18270.
t/zd_America-Ojinaga.t .. Dubious, test returned 8 (wstat 2048, 0x800)
Failed 8/18270 subtests 

Test Summary Report
-------------------
t/zd_America-Ojinaga.t (Wstat: 2048 Tests: 18270 Failed: 8)
  Failed tests:  1075, 1078-1080, 1084, 1087-1089
  Non-zero exit status: 8
Files=1, Tests=18270,  3 wallclock secs ( 0.96 usr  0.06 sys +  3.42 cusr  0.09 csys =  4.53 CPU)
Result: FAIL

I think the issue is the recent change to the US rules for that zone, in the same month as it already had a DST change.

autarch commented 1 year ago

Fixed in the latest release.