From 6473c9f39b8ab7178d8959bf561fd77a3daf5947 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 14 Nov 2011 23:40:19 -0500 Subject: [PATCH] Unit Test Bug - Fixed an odd bug in the unit tests. If today is the 14th of the month, then subtracting 14 * 86_400 from the current time results in a date that is in the prior month. Except of course, for one month following the shift from summer time to standard time, when the test is run between 11:00pm and midnight. The reverse happens in the spring. --- test/history.monthly.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/history.monthly.t b/test/history.monthly.t index 2d4b46f80..422e06d05 100755 --- a/test/history.monthly.t +++ b/test/history.monthly.t @@ -43,7 +43,7 @@ if (open my $fh, '>', 'time.rc') my @timeArray = localtime(time); my $now = time (); -my $lastmonth = $now - $timeArray[3] * 86_400; +my $lastmonth = $now - ($timeArray[3] + 1) * 86_400; if (open my $fh, '>', 'pending.data') {