Skip Menu |
 

This queue is for tickets about the Calendar-Simple CPAN distribution.

Report information
The Basics
Id: 124532
Status: resolved
Priority: 0/
Queue: Calendar-Simple

People
Owner: DAVECROSS [...] cpan.org
Requestors: bitcardbmw [...] lsmod.de
Cc:
AdminCc:

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



Subject: timelocal should be called with 4-digit year
Download (untitled) / with headers
text/plain 470b
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 below patch --- Calendar-Simple-1.21.orig/lib/Calendar/Simple.pm +++ Calendar-Simple-1.21/lib/Calendar/Simple.pm @@ -89 +89 @@ sub calendar { - $first = (localtime timelocal 0, 0, 0, 1, $mon -1, $year - 1900)[6]; + $first = (localtime timelocal 0, 0, 0, 1, $mon -1, $year)[6];
Download (untitled) / with headers
text/plain 632b
On Thu Feb 22 04:16:09 2018, bmwiedemann wrote: Show quoted text
> 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 below patch > > --- Calendar-Simple-1.21.orig/lib/Calendar/Simple.pm > +++ Calendar-Simple-1.21/lib/Calendar/Simple.pm > @@ -89 +89 @@ sub calendar { > - $first = (localtime timelocal 0, 0, 0, 1, $mon -1, $year - 1900)[6]; > + $first = (localtime timelocal 0, 0, 0, 1, $mon -1, $year)[6];
Thanks for the suggestion. Version 1.22 is on its way to CPAN with this fix. Dave...


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.