mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-17 10:01:48 +02:00
🐛 Fix fallback behaviour for unrecognized timezones (#1241)
This commit is contained in:
parent
7bc978b87a
commit
2798ba65ce
3 changed files with 63 additions and 25 deletions
|
@ -17,10 +17,7 @@ import * as React from "react";
|
|||
import { useAsync } from "react-use";
|
||||
|
||||
import { usePreferences } from "@/contexts/preferences";
|
||||
import {
|
||||
getBrowserTimeZone,
|
||||
resolveGeographicTimeZone,
|
||||
} from "@/utils/date-time-utils";
|
||||
import { getBrowserTimeZone, normalizeTimeZone } from "@/utils/date-time-utils";
|
||||
|
||||
import { useRequiredContext } from "../components/use-required-context";
|
||||
|
||||
|
@ -213,7 +210,7 @@ export const DayjsProvider: React.FunctionComponent<{
|
|||
const preferredTimeZone = React.useMemo(
|
||||
() =>
|
||||
config?.timeZone
|
||||
? resolveGeographicTimeZone(config?.timeZone)
|
||||
? normalizeTimeZone(config?.timeZone)
|
||||
: getBrowserTimeZone(),
|
||||
[config?.timeZone],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue