🐛 Fix time zone conversion from utc date

This commit is contained in:
Luke Vella 2023-10-02 15:44:10 +01:00
parent 04d8b71281
commit 557612b9b3

View file

@ -105,9 +105,9 @@ export const parseTimeSlotOption = (
timeFormat: TimeFormat, timeFormat: TimeFormat,
): ParsedTimeSlotOption => { ): ParsedTimeSlotOption => {
const adjustTimeZone = (date: Date | dayjs.Dayjs) => { const adjustTimeZone = (date: Date | dayjs.Dayjs) => {
const d = dayjs(date); const d = dayjs(date).utc();
if (!timeZone) { if (!timeZone) {
return d.utc(); return d;
} }
const t = d.tz(timeZone, true); const t = d.tz(timeZone, true);