Skip to content

Commit 5679d01

Browse files
authored
Merge pull request #287 from wpengine/sitemap-dates
fix: sitemap time stamp format
2 parents d0196ce + 705f6db commit 5679d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/wp-sitemap.xml/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const getServerSideProps = async (ctx) => {
4747

4848
const fields = posts.map((post) => ({
4949
loc: new URL(post.uri, env.NEXT_PUBLIC_SITE_URL).href, // Absolute url
50-
lastmod: post.modified,
50+
lastmod: new Date(post.modified).toISOString(),
5151
}));
5252

5353
return getServerSideSitemapLegacy(ctx, fields);

0 commit comments

Comments
 (0)