Skip to content

Commit

Permalink
Fix Date for lastmod (#7480)
Browse files Browse the repository at this point in the history
* Fix Date for lastmod

* Clean up

* Update tests
  • Loading branch information
timngyn authored May 4, 2024
1 parent 5a0f606 commit a5bc7d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/__tests__/generate-sitemap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('generate-sitemap', () => {
`
<url>
<loc>https://docs.amplify.aws/react/build-a-backend/</loc>
<lastmod>2022-05-12T16:00:00+0:00</lastmod>
<lastmod>2022-05-12T16:00:00.000Z</lastmod>
<changefreq>hourly</changefreq>
<priority>0.5</priority>
</url>`
Expand Down
2 changes: 1 addition & 1 deletion tasks/generate-sitemap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SITEMAP_DOMAIN = process.env.SITEMAP_DOMAIN
// Path of the Next.js static HTML build output
const ROOT_PATH = './client/www/next-build';

const formatDate = (date) => `${date.toISOString().split('.')[0]}+0:00`;
const formatDate = (date) => date.toISOString();
const getPriority = () => 0.5;

const PLATFORMS = [
Expand Down

0 comments on commit a5bc7d1

Please sign in to comment.