From 447def5849a3192e1a7dd877c5297df46eecd72e Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Tue, 8 Feb 2022 21:31:18 +0530 Subject: [PATCH] Timeslot selectable times fix for not UTC timezones in Availability (#1721) * --wip * fix for event type availability tz mismatch * cleanup Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- components/ui/Scheduler.tsx | 24 ++++++++++++++++-------- components/ui/form/Schedule.tsx | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/components/ui/Scheduler.tsx b/components/ui/Scheduler.tsx index d773c42b..4251325b 100644 --- a/components/ui/Scheduler.tsx +++ b/components/ui/Scheduler.tsx @@ -73,9 +73,17 @@ export const Scheduler = ({ availability, setAvailability, timeZone, setTimeZone className="px-3 py-2 text-sm rounded-sm bg-neutral-100" type="button" onClick={() => setEditSchedule(idx)}> - {item.startTime.toLocaleTimeString(i18n.language, { hour: "numeric", minute: "2-digit" })} + {item.startTime.toLocaleTimeString(i18n.language, { + hour: "numeric", + minute: "2-digit", + timeZone: "UTC", + })}  {t("until")}  - {item.endTime.toLocaleTimeString(i18n.language, { hour: "numeric", minute: "2-digit" })} + {item.endTime.toLocaleTimeString(i18n.language, { + hour: "numeric", + minute: "2-digit", + timeZone: "UTC", + })}