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
Download (untitled) / with headers
text/plain 255b
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
Download fix.patch
text/x-diff 686b
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);";


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.