fix: Future Limit Calculations (#15825)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2024-08-02 18:00:50 +05:30
1 parent c059d79a51
commit 06ce1988f3
5 files changed
+253 -91

No files matched your search

@@ -258,7 +258,6 @@ async function handler(
}
const fullName = getFullName(bookerName);
// Why are we only using "en" locale
const tGuests = await getTranslation("en", "common");
@@ -295,6 +294,8 @@ async function handler(
})
);
const eventTimeZone = eventType.schedule?.timeZone ?? null;
let timeOutOfBounds = false;
try {
timeOutOfBounds = isOutOfBounds(
@@ -305,7 +306,8 @@ async function handler(
periodEndDate: eventType.periodEndDate,
periodStartDate: eventType.periodStartDate,
periodCountCalendarDays: eventType.periodCountCalendarDays,
utcOffset: getUTCOffsetByTimezone(reqBody.timeZone) ?? 0,
bookerUtcOffset: getUTCOffsetByTimezone(reqBody.timeZone) ?? 0,
eventUtcOffset: eventTimeZone ? getUTCOffsetByTimezone(eventTimeZone) ?? 0 : 0,
},
eventType.minimumBookingNotice
);
@@ -428,7 +430,7 @@ async function handler(
startAsDate,
eventType.id,
rescheduleUid,
eventType.schedule?.timeZone
eventTimeZone
);
}
if (eventType.durationLimits) {