Skip Menu |
 

This queue is for tickets about the Badger CPAN distribution.

Report information
The Basics
Id: 124553
Status: new
Priority: 0/
Queue: Badger

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

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: (no value)



Subject: timelocal should be called with 4-digit year
Download (untitled) / with headers
text/plain 214b
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 (not tested)
Subject: fix.patch
Download fix.patch
text/x-diff 818b
Index: Badger-0.12/lib/Badger/Period.pm =================================================================== --- Badger-0.12.orig/lib/Badger/Period.pm +++ Badger-0.12/lib/Badger/Period.pm @@ -156,8 +156,10 @@ sub join_uri { sub epoch_time { my $self = shift; + my @p = $self->posix_args; + $p[5] += 1900; return $self->{ etime } ||= timelocal( - $self->posix_args + @p ); } Index: Badger-0.12/lib/Badger/Timestamp.pm =================================================================== --- Badger-0.12.orig/lib/Badger/Timestamp.pm +++ Badger-0.12/lib/Badger/Timestamp.pm @@ -203,7 +203,7 @@ sub epoch_time { return $self->{ etime } ||= timelocal( @$self{@SMHD}, $self->{ month } - 1, - $self->{ year } - 1900 + $self->{ 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.