fixed slots availability by fixing buffertime (#3756)

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/3970/head
Kszemi 2022-08-25 18:57:15 +02:00 committed by GitHub
parent 9c3cea512f
commit 45f16333a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -63,10 +63,10 @@ const checkIfIsAvailable = ({
}
const slotEndTime = time.add(eventLength, "minutes").utc();
const slotStartTime = time.subtract(beforeBufferTime, "minutes").utc();
const slotStartTime = time.utc();
return busy.every((busyTime) => {
const startTime = dayjs.utc(busyTime.start);
const startTime = dayjs.utc(busyTime.start).subtract(beforeBufferTime, "minutes").utc();
const endTime = dayjs.utc(busyTime.end);
if (endTime.isBefore(slotStartTime) || startTime.isAfter(slotEndTime)) {