Skip to content

Commit

Permalink
add timezone explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
halsk committed Dec 16, 2023
1 parent dad6e28 commit c1e1ba4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layouts/components/FormattedDate.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ console.log(date);

<time datetime={date.toISOString()}>
{
date.toLocaleDateString("ja", {
date.toLocaleDateString("ja-JP", {
year: "numeric",
month: "short",
day: "numeric",
hour: enableTime ? "numeric" : undefined,
minute: enableTime ? "numeric" : undefined,
timeZone: "Asia/Tokyo",
})
}
</time>

0 comments on commit c1e1ba4

Please sign in to comment.