From 397e657a0a69dda3405bab58dc78085a4ce22ef8 Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Sat, 18 Feb 2023 17:39:42 +0100 Subject: [PATCH] moved timezone & locales to format function --- web/src/routes/Events.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index 5cf8dbf52..d5d7b52bc 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -287,9 +287,6 @@ export default function Events({ path, ...props }) { return ; } - const timezone = config.ui?.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone; - const locale = window.navigator?.language || 'en-US'; - return (
Events @@ -508,7 +505,7 @@ export default function Events({ path, ...props }) {
- {formatUnixTimestampToDateTime(event.start_time, locale, timezone, config.ui?.use12hour)} + {formatUnixTimestampToDateTime(event.start_time, { ...config.ui })}
-