Skip Menu |

This queue is for tickets about the Astro-Sunrise CPAN distribution.

Report information
The Basics
Id: 120598
Status: resolved
Priority: 0/
Queue: Astro-Sunrise

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.96
Fixed in: 0.97



Subject: t/08timezone.t fails today
Right now I see the following test failure: ... perl -Mblib t/08timezone.t 1..4 ok 1 - Comparing basic parameters with all parameters ok 2 - Comparing basic parameters with all parameters not ok 3 - Test DateTime sunrise interface # Failed test 'Test DateTime sunrise interface' # at t/08timezone.t line 60. # got: '06:05' # expected: '07:05' not ok 4 - Test DateTime sunset interface # Failed test 'Test DateTime sunset interface' # at t/08timezone.t line 61. # got: '17:58' # expected: '18:58' # Looks like you failed 2 tests of 4. ... Probably this happens only today (2017-03-12 19:55) --- if I run the test with -MTime::Fake=+1d or -1d, then this test passes. If TZ is relevant: I see it with a UTC timezone and with TZ=Europe/Berlin.
On Sun Mar 12 19:56:19 2017, SREZIC wrote: Show quoted text
> Right now I see the following test failure: > > ... > perl -Mblib t/08timezone.t > 1..4 > ok 1 - Comparing basic parameters with all parameters > ok 2 - Comparing basic parameters with all parameters > not ok 3 - Test DateTime sunrise interface > # Failed test 'Test DateTime sunrise interface' > # at t/08timezone.t line 60. > # got: '06:05' > # expected: '07:05' > not ok 4 - Test DateTime sunset interface > # Failed test 'Test DateTime sunset interface' > # at t/08timezone.t line 61. > # got: '17:58' > # expected: '18:58' > # Looks like you failed 2 tests of 4. > ... > > Probably this happens only today (2017-03-12 19:55) --- if I run the > test with -MTime::Fake=+1d or -1d, then this test passes. If TZ is > relevant: I see it with a UTC timezone and with TZ=Europe/Berlin.
This happens on 2017-03-12 because (I guess), most of the USA switches to DST this day. The test script uses "2017-03-12 00h00" to determine the current local timezone offset, which is no longer the proper offset when the sun rises on Los Angeles. It will happen again on the autumn DST switch. UTC and Berlin and Paris and others are irrelevant: this test contains the hard-coded value "America/Los_Angeles", a remainder of the tests as written by the original author, Ron Hill. I did not think it would be useful to change it, so I kept it. I can change the test so it will use a noon datetime to compute the offset instead of a midnight datetime. For America/Los_Angeles, it will work. Some timezones switch to DST during the day. It would not work for them, but I do not check them. Thank you for your interest in Astro::Sunrise and for your work as a smoke tester. Jean Forget