From dc98fdf6664645b6356b71a60edca9a07f21dff6 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 2 Sep 2021 19:29:54 -0500 Subject: Fix sitemap.xml date formatting --- src/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server.js') diff --git a/src/server.js b/src/server.js index 478e601..4e109ad 100644 --- a/src/server.js +++ b/src/server.js @@ -102,15 +102,15 @@ async function sitemap(models) { "/projects", ] routes.forEach(item => { - urlset.push(to_sitemap_xml(host, item, Date.now())) + urlset.push(to_sitemap_xml(host, item, new Date().toISOString())) }) let posts = (await models.posts.findAll()).map(x => x.get({ plain: true })); posts.forEach(post => { - urlset.push(to_sitemap_xml(host, `/posts/${post.type}/${post.id}`, posts.updatedAt)) + urlset.push(to_sitemap_xml(host, `/posts/${post.type}/${post.id}`, post.updatedAt.toISOString())) }) let tags = (await models.tags.findAll()).map(x => x.get({ plain: true })); tags.forEach(tag => { - urlset.push(to_sitemap_xml(host, `/tags/${tag.text}`, tag.updatedAt)) + urlset.push(to_sitemap_xml(host, `/tags/${tag.text}`, tag.updatedAt.toISOString())) }) return `${urlset.join("")}`; } -- cgit v1.2.3