Skip Menu |

This queue is for tickets about the Date-ICal CPAN distribution.

Report information
The Basics
Id: 124548
Status: open
Priority: 0/
Queue: Date-ICal

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

Bug Information
Severity: Important
Broken in: 2.678
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 (not tested)
Subject: fix.patch
Index: Date-ICal-2.678/lib/Date/ICal.pm =================================================================== --- Date-ICal-2.678.orig/lib/Date/ICal.pm +++ Date-ICal-2.678/lib/Date/ICal.pm @@ -334,7 +334,7 @@ sub epoch { $epoch = timegm( $self->sec, $self->min, $self->hour, $self->day, - ( $self->month ) - 1, ( $self->year ) - 1900 ); + ( $self->month ) - 1, $self->year); } return $epoch;
On 2018-02-23 09:46:28, 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 attached patch (not tested)
Since today (2020-01-01) the test suite is failing because of this problem.
On 2020-01-01 05:11:14, SREZIC wrote: Show quoted text
> On 2018-02-23 09:46:28, bmwiedemann wrote:
> > 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)
> > Since today (2020-01-01) the test suite is failing because of this problem.
CPAN.pm users may use the following distroprefs file for automatic patching: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Date-ICal.yml