Skip Menu |
 

This queue is for tickets about the XML-FeedPP CPAN distribution.

Report information
The Basics
Id: 124569
Status: resolved
Priority: 0/
Queue: XML-FeedPP

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

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



Subject: timegm should be called with 4-digit year
Download (untitled) / with headers
text/plain 102b
See https://rt.cpan.org/Public/Bug/Display.html?id=124549 please review/test/merge the attached patch
Subject: fix.patch
Download fix.patch
text/x-diff 1.2k
Index: XML-FeedPP-0.43/lib/XML/FeedPP.pm =================================================================== --- XML-FeedPP-0.43.orig/lib/XML/FeedPP.pm +++ XML-FeedPP-0.43/lib/XML/FeedPP.pm @@ -2468,7 +2468,7 @@ sub w3cdtf_to_rfc1123 { $hour ||= 0; $min ||= 0; $sec ||= 0; - my $epoch = Time::Local::timegm( $sec, $min, $hour, $mday, $mon-1, $year-1900 ); + my $epoch = Time::Local::timegm( $sec, $min, $hour, $mday, $mon-1, $year ); my $wday = ( gmtime($epoch) )[6]; if ( defined $tz && $tz ne '' && $tz ne 'Z' ) { my $off = &get_tz_offset($tz) / 60; @@ -2491,7 +2491,7 @@ sub rfc1123_to_epoch { $year += 2000 if $year < 77; $year += 1900 if $year < 100; $mon = $MoY{ uc($mon) } or return; - my $epoch = Time::Local::timegm( $sec, $min, $hour, $mday, $mon-1, $year-1900 ); + my $epoch = Time::Local::timegm( $sec, $min, $hour, $mday, $mon-1, $year ); $epoch -= &get_tz_offset( $tz ); $epoch; } @@ -2504,7 +2504,7 @@ sub w3cdtf_to_epoch { $hour ||= 0; $min ||= 0; $sec ||= 0; - my $epoch = Time::Local::timegm( $sec, $min, $hour, $mday, $mon-1, $year-1900 ); + my $epoch = Time::Local::timegm( $sec, $min, $hour, $mday, $mon-1, $year ); $epoch -= &get_tz_offset( $tz ); $epoch; }
taken for 0.95


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.