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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.18-29656-1519399097-48.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1519399097-29656-2"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 214
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
MIME-Version: 1.0
Content-Type: text/x-patch; name="fix.patch"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="fix.patch"
Content-Transfer-Encoding: binary
Content-Length: 818
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.