Skip to content

Commit

Permalink
Fix use toISOString instead of toLocaleDateString
Browse files Browse the repository at this point in the history
  • Loading branch information
Cactooz authored Aug 18, 2023
1 parent 5783d46 commit 3d27410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function build(customUpdatedAt: string | undefined): void {
const songs = getAllSongs().filter((song) => !song.deleted);
const updatedAt = customUpdatedAt?.match(/^\d{4}-(0\d|1[012])-([012]\d|3[01])$/)
? customUpdatedAt
: new Date().toLocaleDateString();
: new Date().toISOString().split('T').at(0);

writeJson(songs, updatedAt);
writeXml(songs, updatedAt);
Expand Down

0 comments on commit 3d27410

Please sign in to comment.