From 3283eb422c001fcc5b3ab8c0393b7e0a419d27e4 Mon Sep 17 00:00:00 2001 From: Malte Delfs Date: Sun, 11 Jul 2021 18:05:49 +0200 Subject: [PATCH] Fixed a bug that selected the following day on the booking page, when the selected time is smaller than the utc offset of the current timezone. Also fixed the reloading of the last 24h/12h selection --- lib/slots.ts | 2 +- pages/[user]/[type].tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/slots.ts b/lib/slots.ts index 862e8b145e..3c0d45a15b 100644 --- a/lib/slots.ts +++ b/lib/slots.ts @@ -131,7 +131,7 @@ const getSlots = ({ ) .reduce((slots, boundary: Boundary) => [...slots, ...getSlotsBetweenBoundary(frequency, boundary)], []) .map((slot) => - slot.month(inviteeDate.month()).date(inviteeDate.date()).utcOffset(inviteeDate.utcOffset()) + slot.utcOffset(inviteeDate.utcOffset()).month(inviteeDate.month()).date(inviteeDate.date()) ); }; diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsx index 52e0773b31..a2e9c82b85 100644 --- a/pages/[user]/[type].tsx +++ b/pages/[user]/[type].tsx @@ -25,6 +25,7 @@ export default function Type(props): Type { const telemetry = useTelemetry(); useEffect(() => { + handleToggle24hClock(localStorage.getItem("timeOption.is24hClock") === "true"); telemetry.withJitsu((jitsu) => jitsu.track(telemetryEventTypes.pageView, collectPageParameters())); }, [telemetry]);