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' );
}