Skip Menu |

This queue is for tickets about the TimeDate CPAN distribution.

Report information
The Basics
Id: 4733
Status: resolved
Priority: 0/
Queue: TimeDate

Owner: Nobody in particular
Requestors: guido [...]

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


Subject: Improved, more robust RSS date parsing
Download (untitled) / with headers
text/plain 365b
This is against version 2.22. I realize there is a fix since then, but after that you changed Date::Parse to return undef in cases where it cannot grok the date, instead of a best effort parse. That's ok, but this patch makes it handle timezones better, and with RSS, you can't control what's coming in at you ... So this is a slight improvement on the same issue.
Download TimeDate-2.22.patch
text/x-diff 492b
--- /usr/lib/perl5/vendor_perl/5.8.2/Date/ 2003-12-18 00:07:46.000000000 +0000 +++ Date/ 2003-12-21 00:58:52.074385504 +0000 @@ -150,7 +150,7 @@ $zone = tz_offset($1); return unless defined $zone; } - elsif ($dtstr =~ s#\s([a-z]{3,4})?([\-\+]?)-?(\d\d?)(\d\d)?(00)?\s# #o) { + elsif ($dtstr =~ s#\s([a-z]{3,4})?([\-\+]?)-?(\d\d?):?(\d\d)?:?(00)?\s# #o) { my $m = defined($4) ? "$2$4" : 0; my $h = "$2$3"; $zone = defined($1) ? tz_offset($1) : 0;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to