Skip Menu |

This queue is for tickets about the Arch CPAN distribution.

Report information
The Basics
Id: 124554
Status: new
Priority: 0/
Queue: Arch

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

Bug Information
Severity: Normal
Broken in: 0.5.2
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. Please review/test/merge the attached patch
Subject: fix.patch
Index: Arch-0.5.2/perllib/Arch/Util.pm =================================================================== --- Arch-0.5.2.orig/perllib/Arch/Util.pm +++ Arch-0.5.2/perllib/Arch/Util.pm @@ -187,7 +187,7 @@ sub date2daysago ($) { # timezone is not taken in account... require Time::Local; - my $time = Time::Local::timegm($6, $5, $4, $3, $2 - 1, $1 - 1900); + my $time = Time::Local::timegm($6, $5, $4, $3, $2 - 1, $1); my $daysago = int((time - $time) / 60 / 60 / 24); return $daysago unless wantarray;