Skip to content

Commit 42de4de

Browse files
authored
Force blog timestamps to be in UTC (#2373)
Fixes an issue where timestamps rendered different dates depending on the user's location: <img width="695" height="359" alt="Screenshot 2026-04-01 at 12 49 32 PM" src="https://github.com/user-attachments/assets/1b029ffa-a452-4bf8-ac84-d95f15e7b02c" /> <img width="695" height="2400" alt="image" src="https://github.com/user-attachments/assets/e3882000-b075-49da-8e02-6ae976590d15" />
1 parent 3b287a4 commit 42de4de

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/app/(main)/resources/blog-post-list-item.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function BlogPostListItem({
2323
day: "2-digit",
2424
month: "2-digit",
2525
year: "numeric",
26+
timeZone: "UTC",
2627
})
2728
.replaceAll("/", "-")
2829

src/components/blog-page/blog-card.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export function BlogCardFooterContent({
9595
month: "long",
9696
day: "numeric",
9797
year: "numeric",
98+
timeZone: "UTC",
9899
})}
99100
</time>
100101
</span>

src/pages/blog/_meta.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default {
4444
month: "long",
4545
day: "numeric",
4646
year: "numeric",
47+
timeZone: "UTC",
4748
})}
4849
</time>
4950
</div>

0 commit comments

Comments
 (0)