homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Google Sitemap Invalid date Error
BlackRaven




msg:3945062
 6:33 pm on Jul 2, 2009 (gmt 0)

I got this error on my google webmaster panel and cant figure what the problem is, it has to do with the second lastmod date

line 7 Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting.

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap>
<loc>http://www.example.com/sitemap1.xml</loc>
<lastmod>2009-06-28T22:48:03-05:00</lastmod>
</sitemap> <sitemap>
<loc>http://www.example.com/sitemap2.xml</loc>
<lastmod>2009-07-2T13:18:03-05:00</lastmod>
</sitemap><!-- list sitemaps --></sitemapindex>

 

BlackRaven




msg:3945068
 6:36 pm on Jul 2, 2009 (gmt 0)

I am using this code to $time=date("Y-m-j\TH:i:sP"); to get the lastmod date

jmccormac




msg:3945072
 6:39 pm on Jul 2, 2009 (gmt 0)

Is the \T being interepreted as a Horizontal Tab instead of the letter T? Or perhaps Google is not recogising the section after the T in the lastmod data?

Regards...jmcc

janharders




msg:3945090
 6:57 pm on Jul 2, 2009 (gmt 0)

maybe you should use d instead of j, iirc leading zeros are not optional in the W3C Datetime type.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved