From e30042220c1ff72e2f451a22ed99b80bddde8809 Mon Sep 17 00:00:00 2001 From: kiosion Date: Fri, 10 Nov 2023 19:24:28 -0500 Subject: [PATCH] fix: Use UTC for all dates since time isn't shown anyways --- svelte-app/src/lib/helpers/date.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/svelte-app/src/lib/helpers/date.ts b/svelte-app/src/lib/helpers/date.ts index bbf0008a0..11a67604e 100644 --- a/svelte-app/src/lib/helpers/date.ts +++ b/svelte-app/src/lib/helpers/date.ts @@ -8,6 +8,7 @@ export const formatDate = ( lang: string = get(currentLang) || 'en' ) => { const date = new Date(dateStr); + date.setHours(0 - date.getTimezoneOffset() / 60); switch (format) { case 'full': return new Intl.DateTimeFormat(lang, {