From 895ccbb2418ed25db6b14e01acdf7b4816d94773 Mon Sep 17 00:00:00 2001 From: lillijo Date: Fri, 5 Jul 2024 16:55:19 +0200 Subject: [PATCH] hopefully fix timezone issue --- .../project/detail/contextGroups/contextGroups.server.tsx | 4 ++++ src/i18n.ts | 2 +- src/lib/intlProvider.tsx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/project/detail/contextGroups/contextGroups.server.tsx b/src/components/project/detail/contextGroups/contextGroups.server.tsx index d50f652..ba223b9 100644 --- a/src/components/project/detail/contextGroups/contextGroups.server.tsx +++ b/src/components/project/detail/contextGroups/contextGroups.server.tsx @@ -35,22 +35,26 @@ export default function ProjectDetailContextGroups({ weekday: 'short', month: 'long', day: 'numeric', + timeZone: 'UTC', }); const startTime = time.start.toLocaleTimeString(locale, { hour: '2-digit', minute: '2-digit', + timeZone: 'UTC', }); const endDate = time.end.toLocaleDateString(locale, { weekday: 'short', month: 'long', day: 'numeric', + timeZone: 'UTC', }); const endTime = time.end.toLocaleTimeString(locale, { hour: '2-digit', minute: '2-digit', + timeZone: 'UTC', }); const dateTime = diff --git a/src/i18n.ts b/src/i18n.ts index ab3817c..a4f41f2 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -17,7 +17,7 @@ export default getRequestConfig(async ({ locale }) => getMessageFallback({ namespace, key, error }) { return key; }, - timeZone: 'Europe/Berlin', + timeZone: 'UTC', messages: ( await (locale === 'en' diff --git a/src/lib/intlProvider.tsx b/src/lib/intlProvider.tsx index 494148b..7c44c30 100644 --- a/src/lib/intlProvider.tsx +++ b/src/lib/intlProvider.tsx @@ -24,7 +24,7 @@ export default function IntlProvider({ messages, locale, children }: any) { messages={messages} getMessageFallback={getMessageFallback} onError={onError} - timeZone="Europe/Berlin" + timeZone="UTC" > {children}