Fixes #347 & some other minor things when timezones differ

This commit is contained in:
Alex van Andel committed 2021-07-08 21:14:29 +00:00
1 parent ffd99d02bb
commit be102b1b09
4 files changed
+28 -8

No files matched your search

+5 -2
View File
@@ -81,9 +81,12 @@ const organizerBoundaries = (
}
}
} else {
boundaries.push({ lowerBound, upperBound });
if (item.days.includes(startDay)) {
boundaries.push({ lowerBound, upperBound });
}
}
});
return boundaries;
};
@@ -116,7 +119,7 @@ const getSlots = ({
workingHours,
organizerTimeZone,
}: GetSlots): Dayjs[] => {
const startTime = dayjs.utc().isSame(dayjs(inviteeDate), "day")
const startTime = dayjs().utcOffset(inviteeDate.utcOffset()).isSame(inviteeDate, "day")
? inviteeDate.hour() * 60 + inviteeDate.minute() + (minimumBookingNotice || 0)
: 0;