Skip Menu |

This queue is for tickets about the Logfile CPAN distribution.

Report information
The Basics
Id: 124544
Status: new
Priority: 0/
Queue: Logfile

People
Owner: Nobody in particular
Requestors: bitcardbmw [...] lsmod.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.302
Fixed in: (no value)



Subject: timegm should be called with 4-digit year
man Time::Local says Whenever possible, use an absolute four digit year instead. With a detailed explanation about ambiguity of 2-digit years above that - e.g. 67 is already interpreted as 2067. Please review/test/merge the attached patch (not tested)
Subject: fix.patch
Index: Logfile-0.302/lib/Logfile/Base.pm =================================================================== --- Logfile-0.302.orig/lib/Logfile/Base.pm +++ Logfile-0.302/lib/Logfile/Base.pm @@ -363,14 +363,13 @@ sub to_time { } elsif ($date =~ s!\b$monreg\b(\s+(\d+))?! !io) { $mon = $monnum{lc($1)}; $mday = $3; # possibly not set - if ($date =~ s/19(\d\d)/ /) { + if ($date =~ s/(19\d\d)/ /) { $year = $1; } } if ($date =~ s!\b(\d+):(\d+)(:(\d+))?! !) { ($hours, $min, $sec) = ($1, $2, $4); } - $year -= 1900 if $year > 1900; #print "($sec,$min,$hours,$mday,$mon,$year);";