From 3ab0b04cf065bead13bd0445ff37598a958e7851 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Sun, 8 Dec 2024 22:35:49 +0000 Subject: [PATCH 1/2] fix(Date): Account for local timezone offset --- quartz/components/Date.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/components/Date.tsx b/quartz/components/Date.tsx index 0a92cc4c3..e21c9477d 100644 --- a/quartz/components/Date.tsx +++ b/quartz/components/Date.tsx @@ -27,5 +27,5 @@ export function formatDate(d: Date, locale: ValidLocale = "en-US"): string { } export function Date({ date, locale }: Props) { - return + return } From 2a4d35435fc582df31f4219b7e85cf54828fcdda Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Mon, 9 Dec 2024 00:09:03 +0000 Subject: [PATCH 2/2] Get TimeZone --- quartz/components/Date.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quartz/components/Date.tsx b/quartz/components/Date.tsx index e21c9477d..0f73ac7b4 100644 --- a/quartz/components/Date.tsx +++ b/quartz/components/Date.tsx @@ -23,9 +23,10 @@ export function formatDate(d: Date, locale: ValidLocale = "en-US"): string { year: "numeric", month: "short", day: "2-digit", + timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, }) } export function Date({ date, locale }: Props) { - return + return }