fix: Invalid time zone specified: Etc/Unknown (#18121)
* fix: Invalid time zone specified: Etc/Unknown * update * Update PaymentPage.tsx * update * update one more file * address review * update test --------- Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
1 parent
a84513eda5
commit
645985c783
10 files changed
+30
-23
No files matched your search
@@ -5,7 +5,7 @@ import dayjs from "@calcom/dayjs";
|
||||
import { PayIcon } from "@calcom/features/bookings/components/event-meta/PayIcon";
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
import type { PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
|
||||
import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants";
|
||||
import { APP_NAME, WEBSITE_URL, CURRENT_TIMEZONE } from "@calcom/lib/constants";
|
||||
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { isBrowserLocale24h } from "@calcom/lib/timeFormat";
|
||||
@@ -40,8 +40,7 @@ export const PaymentForm = ({
|
||||
const eventName = paymentInfo?.booking.title;
|
||||
|
||||
const is24h = isBrowserLocale24h();
|
||||
const timezone =
|
||||
localStorage.getItem("timeOption.preferredTimeZone") || dayjs.tz.guess() || "Europe/London";
|
||||
const timezone = localStorage.getItem("timeOption.preferredTimeZone") || CURRENT_TIMEZONE;
|
||||
const date = dayjs.utc(paymentInfo?.booking.startTime).tz(timezone);
|
||||
|
||||
if (isLoading) return <h1 className="p-4 pt-4 text-xl">Loading...</h1>;
|
||||
|
||||
Reference in new issue
Block a user