fix/availability-tz-offset (#3185)

This commit is contained in:
alannnc authored and GitHub committed 2022-06-29 09:01:30 +00:00
1 parent 654cfbb653
commit 3f3ffa2ba8
3 files changed
+12 -8

No files matched your search

+7
View File
@@ -41,6 +41,13 @@ const getSlots = ({ inviteeDate, frequency, minimumBookingNotice, workingHours,
const startOfDay = dayjs.utc().startOf("day");
const startOfInviteeDay = inviteeDate.startOf("day");
// checks if the start date is in the past
/**
* TODO: change "day" for "hour" to stop displaying 1 day before today
* This is displaying a day as available as sometimes difference between two dates is < 24 hrs.
* But when doing timezones an available day for an owner can be 2 days available in other users tz.
*
* */
if (inviteeDate.isBefore(startDate, "day")) {
return [];
}