Revert "Fixes #1572 (#1622)" (#1630)

This reverts commit 2a77f2c477.
This commit is contained in:
Alex van Andel 2022-01-27 15:16:38 +00:00 committed by GitHub
parent 2a77f2c477
commit 64f39b0d47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ const getSlots = ({ inviteeDate, frequency, minimumBookingNotice, workingHours }
const slots: Dayjs[] = []; const slots: Dayjs[] = [];
for (let minutes = getMinuteOffset(inviteeDate, frequency); minutes < 1440; minutes += frequency) { for (let minutes = getMinuteOffset(inviteeDate, frequency); minutes < 1440; minutes += frequency) {
const slot = dayjs.utc(inviteeDate).startOf("day").add(minutes, "minute"); const slot = dayjs(inviteeDate).startOf("day").add(minutes, "minute");
// check if slot happened already // check if slot happened already
if (slot.isBefore(startDate)) { if (slot.isBefore(startDate)) {
continue; continue;
@ -60,7 +60,7 @@ const getSlots = ({ inviteeDate, frequency, minimumBookingNotice, workingHours }
) )
) )
) { ) {
slots.push(slot.local()); slots.push(slot);
} }
} }