Skip to content

Commit

Permalink
hopefully fix timezone issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lillijo committed Jul 5, 2024
1 parent 77e6899 commit 895ccbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default getRequestConfig(async ({ locale }) =>
getMessageFallback({ namespace, key, error }) {
return key;
},
timeZone: 'Europe/Berlin',
timeZone: 'UTC',

messages: (
await (locale === 'en'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/intlProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function IntlProvider({ messages, locale, children }: any) {
messages={messages}
getMessageFallback={getMessageFallback}
onError={onError}
timeZone="Europe/Berlin"
timeZone="UTC"
>
{children}
</NextIntlClientProvider>
Expand Down

0 comments on commit 895ccbb

Please sign in to comment.