I’m using YOAST together with the sp sitemap plugin to generate sitemaps. While the sitemap itself is valid, the date on the main sitemap (sitemap_index.xml) which is generated by the sp plugin is not valid. I was able to fix this in the plugin code (sp-google-sitemap-components.php line 59):
Before:
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : ''; $date = spdb_table(SFPOSTS, '', 'post_date', 'post_date DESC', '1'); $map.= '<sitemap>'; $map.= '<loc>'.home_url($base.'forum-sitemap.xml').'</loc>'; $map.= '<lastmod>'.htmlspecialchars($date).'</lastmod>';
After:
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
$date = spdb_table(SFPOSTS, '', 'UNIX_TIMESTAMP(post_date)', 'post_date DESC', '1');
$map.= '<sitemap>';
$map.= '<loc>'.home_url($base.'forum-sitemap.xml').'</loc>';
$map.= '<lastmod>'.htmlspecialchars(date('c', $date)).'</lastmod>';