Subject: | Negative timezone offsets aren't working |
Okay I hope I'm posting this bug in the right place (this is my first time reporting a bug).
I'm using WWW::Google::SiteMap in my program and it's not handling negative time zone offsets when I give it a last modification date with one.
It's a little hard to explain so I included an example program file that displays this bug.
But anyways inspecting it on my own. Looking in the file WWW::Google::SiteMap::Url.pm,
The sub routine lastmod() can be changed and then it works for me. Basically on line 164 of the file where it has the code
" } elsif(/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\+\d\d:\d\d$/) {"
I changed it to
" } elsif(/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\+|-\d\d:\d\d$/) {"
and then it works for me.
I'm running perl, v5.8.8 on mac os x 10.5.2
Subject: | timezone_test.pl |
#!/usr/bin/env perl -w
use strict;
use warnings;
use 5.8.1;
use WWW::Google::SiteMap;
my $map = WWW::Google::SiteMap->new(file => 'sitemap.gz');
$map->add(WWW::Google::SiteMap::URL->new(
loc => 'http://www.google.com/',
lastmod => '2008-03-12T12:59:00-07:00',
changefreq => 'daily',
priority => 1.0,
));