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.
This commit is contained in:
@@ -43,7 +43,7 @@ if (open my $fh, '>', 'time.rc')
|
|||||||
|
|
||||||
my @timeArray = localtime(time);
|
my @timeArray = localtime(time);
|
||||||
my $now = 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')
|
if (open my $fh, '>', 'pending.data')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user