Subject: | date test fails on windows due to strftime being unreliable |
On Windows strftime cannot display the timezone offset, but only the TZ
name or abbreviation: http://msdn.microsoft.com/de-de/library/fe06s4ak
(VS.80).aspx
This makes the date test fail due to unexpected value-checking data.
Suggested fix:
Change:
my $date = strftime("%Y-%m-%d %H:%M:%S %z", localtime($time));
to:
my $date = strftime("%Y-%m-%d %H:%M:%S", localtime($time));
Add:
my $log_date = $log->date;
$log_date =~ s/ [+-]\d+$//;
Change:
is($log_date, $date, "date");
to:
is($log_date, $date, "date");