Skip Menu |

This queue is for tickets about the WWW-Google-SiteMap CPAN distribution.

Report information
The Basics
Id: 49256
Status: resolved
Priority: 0/
Queue: WWW-Google-SiteMap

People
Owner: Nobody in particular
Requestors: MTHURN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.09
Fixed in: (no value)



Subject: time format is wrong
Given this basic program: use strict; use warnings; use Data::Dumper; use WWW::Google::SiteMap; my $map = WWW::Google::SiteMap->new; my $url = WWW::Google::SiteMap::URL->new( loc => 'http://foo.com/bar.html', lastmod => time, ); # print STDERR Dumper($url); $map->add($url); $map->pretty(1); print $map->xml; __END__ The generated lastmod is NOT in the accepted Google format. The hour:minute:second is totally missing: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"> <url> <loc>http://foo.com/bar.html</loc> <lastmod>2009-08-30T+00:00</lastmod> </url> </urlset>
Subject: test-sitemap.xml
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"> <url> <loc>http://foo.com/bar.html</loc> <lastmod>2009-08-30T+00:00</lastmod> </url> </urlset>
Subject: test-sitemap.pl
use strict; use warnings; use Data::Dumper; use WWW::Google::SiteMap; my $map = WWW::Google::SiteMap->new; my $url = WWW::Google::SiteMap::URL->new( loc => 'http://foo.com/bar.html', lastmod => time, ); print STDERR Dumper($url); $map->add($url); $map->pretty(1); print $map->xml;
WWW::Google::SiteMap is deprecated, but the bug has been fixed in Search::Sitemap. On Sun Aug 30 11:38:31 2009, MTHURN wrote: Show quoted text
> Given this basic program: > > use strict; > use warnings; > use Data::Dumper; > use WWW::Google::SiteMap; > my $map = WWW::Google::SiteMap->new; > my $url = WWW::Google::SiteMap::URL->new( > loc => 'http://foo.com/bar.html', > lastmod => time, > ); > # print STDERR Dumper($url); > $map->add($url); > $map->pretty(1); > print $map->xml; > __END__ > > The generated lastmod is NOT in the accepted Google format. The > hour:minute:second is totally missing: > > <?xml version="1.0" encoding="UTF-8"?> > <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 > http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"> > <url> > <loc>http://foo.com/bar.html</loc> > <lastmod>2009-08-30T+00:00</lastmod> > </url> > </urlset>
-- www.jasonkohles.com