Skip Menu |
 

This queue is for tickets about the DateTime-Format-HTTP CPAN distribution.

Report information
The Basics
Id: 124547
Status: new
Priority: 0/
Queue: DateTime-Format-HTTP

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

Bug Information
Severity: (no value)
Broken in: 0.42
Fixed in: (no value)



Subject: timegm should be called with 4-digit year
Download (untitled) / with headers
text/plain 202b
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
Download fix.patch
text/x-diff 1k
Index: DateTime-Format-HTTP-0.42/t/date.t =================================================================== --- DateTime-Format-HTTP-0.42.orig/t/date.t +++ DateTime-Format-HTTP-0.42/t/date.t @@ -10,7 +10,7 @@ BEGIN { } require Time::Local if $^O eq "MacOS"; -my $offset = ($^O eq "MacOS") ? Time::Local::timegm(0,0,0,1,0,70) : 0; +my $offset = ($^O eq "MacOS") ? Time::Local::timegm(0,0,0,1,0,1970) : 0; # test str2time for supported dates. Test cases with 2 digit year # will probably break in year 2044. Index: DateTime-Format-HTTP-0.42/t/time2str.t =================================================================== --- DateTime-Format-HTTP-0.42.orig/t/time2str.t +++ DateTime-Format-HTTP-0.42/t/time2str.t @@ -11,7 +11,7 @@ BEGIN { } require Time::Local if $^O eq "MacOS"; -my $offset = ($^O eq "MacOS") ? Time::Local::timegm(0,0,0,1,0,70) : 0; +my $offset = ($^O eq "MacOS") ? Time::Local::timegm(0,0,0,1,0,1970) : 0; my $time = (760233600 + $offset); # assume broken POSIX counting of seconds $time = DateTime->from_epoch( epoch => $time );


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.