Skip Menu |

This queue is for tickets about the Algorithm-Cron CPAN distribution.

Report information
The Basics
Id: 103111
Status: resolved
Priority: 0/
Queue: Algorithm-Cron

People
Owner: Nobody in particular
Requestors: syohex [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.09
Fixed in: 0.10



Subject: t/90rt84352.t is failed in some countries
Unix time of 1364846197 is not 2013-04-01 in some countries. For example, it is 2013-04-02 in Japan. So expected value of 2nd test in t/90rt84352.t should be 2013-04-03 04:00:00. Attached patch fixes this issue. Please review it.
Subject: fix-day-issue.patch
diff --git a/t/90rt84352.t b/t/90rt84352.t index 43e5d1b..51d7513 100644 --- a/t/90rt84352.t +++ b/t/90rt84352.t @@ -29,8 +29,10 @@ my $t = 1364846197; crontab => '0 4 * * *', ); + my $that_day = (localtime($t))[3]; + my $next_day = $that_day + 1; is( POSIX::strftime( "%Y-%m-%d %H:%M:%S", localtime( $cron->next_time( $t ) ) ), - "2013-04-02 04:00:00", + "2013-04-0${next_day} 04:00:00", 'Next time in localtime' ); }
On 2015-03-25 10:36:52, syohex wrote: Show quoted text
> Unix time of 1364846197 is not 2013-04-01 in some countries. For > example, it is 2013-04-02 in Japan. So expected value of 2nd test in > t/90rt84352.t should be 2013-04-03 04:00:00. Attached patch fixes this > issue. Please review it.
To reproduce the problem everywhere: env TZ=Asia/Tokyo cpan -t PEVANS/Algorithm-Cron-0.09.tar.gz
Thanks; released as 0.10. -- Paul Evans