From 11ae159419d7790e2c8c96e9603bfd00b2f820b2 Mon Sep 17 00:00:00 2001 From: WickyNilliams Date: Thu, 4 Apr 2024 18:24:14 +0100 Subject: [PATCH] use UTC timezone for date formatting --- src/utils/hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/hooks.ts b/src/utils/hooks.ts index 2f9e17d..fc4eb81 100644 --- a/src/utils/hooks.ts +++ b/src/utils/hooks.ts @@ -57,7 +57,7 @@ type DateFormatOptions = Pick< export function useDateFormatter(options: DateFormatOptions, locale?: string) { return useMemo( - () => new Intl.DateTimeFormat(locale, options), + () => new Intl.DateTimeFormat(locale, { timeZone: "UTC", ...options }), [locale, options] ); }