Automattic / msm-sitemap

Comprehensive sitemaps for your WordPress VIP site. Joint collaboration between Metro.co.uk, WordPress VIP, Alley Interactive, Maker Media, 10up, and others.
73 stars 37 forks source link

lastmod time NOT in UTC #88

Closed kimcheung closed 7 years ago

kimcheung commented 7 years ago

<lastmod>2016-12-01T11:15:43Z</lastmod> The lastmod time is appended with 'Z' signifying it is the ISO-8601 UTC timestamp. However, it is NOT the UTC time, but in actuality, the local time.

This can be easily fixed by modifying line 430 in msm-sitemap.php from $url->addChild( 'lastmod', get_the_modified_date( 'Y-m-d' ) . 'T' . get_the_modified_date( 'H:i:s' ) . 'Z' ); to $url->addChild( 'lastmod', get_post_modified_time( 'Y-m-dTH:i:s', true ) );

mjangda commented 7 years ago

Thanks for the report @kimcheung!