Pods SEO
Error in Date / Time Stamp (6 posts)

  1. herold
    Posted 2 years ago #

    After including a pod that generates the XML and submitting it to Google it looks like that there is an error in the date/time stamp format.


  2. herold
    Posted 2 years ago #

    Error message from Google webmaster tools:

    "An invalid date was found. Please fix the date or formatting before resubmitting."

  3. pglewis
    Plugin Author

    Posted 2 years ago #

    Can you send a link to the xml sitemap to Scott or myself to take at look at this?

  4. herold
    Posted 2 years ago #

    I just checked again and I still see a yellow Explanation icon, however the error message is gone. Will check again in a few days.

  5. mtau
    Posted 2 years ago #

    I had the same issue with WP 3.9.2 and the italian locale (WP_LANG set to it_IT),
    and the 1.0 plugin. My sitemap_index.xml looked like:

    <lastmod>2014-08-14 13:30:56</lastmod>

    The problem is the format of the date (not UTC).
    I inserted this line in the classes/pods-seo-wpseo.php file, at line 228:
    $lastmod = gmdate("Y-m-d\TH:i:s+00:00", strtotime($lastmod));

    Then the error/warning on webmaster tools disappeared.


  6. Julian Matz
    Posted 1 year ago #

    There is an error on line 155 of version 1.0, which I found to be causing the problem.

    The code:

    if ( !empty( $lastmod ) ) {
         date( 'c', strtotime( $lastmod ) );

    Should be:

    if ( !empty( $lastmod ) ) {
         $lastmod = date( 'c', strtotime( $lastmod ) );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Pods SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic