Fix/DST issues (#7462)

* use the organizer timezone and invitee timezone to show slots

* type fixes

* set start date on selected TZ on booking payload

* add considerations when only the invitee is on DTS

* Apply suggestions from code review

Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Omar López <zomars@me.com>

* fixes typo

* Apply suggestions from code review

Co-authored-by: alannnc <alannnc@gmail.com>

* cleaning

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: alannnc <alannnc@gmail.com>
This commit is contained in:
authored and GitHub committed 2023-03-03 09:33:16 -07:00
1 parent b8b24c04dc
commit 2d26d73eb3
7 files changed
+134 -19

No files matched your search

@@ -426,8 +426,8 @@ const BookingPage = ({
} else {
mutation.mutate({
...booking,
start: dayjs(date).format(),
end: dayjs(date).add(duration, "minute").format(),
start: dayjs(date).tz(timeZone()).format(),
end: dayjs(date).tz(timeZone()).add(duration, "minute").format(),
eventTypeId: eventType.id,
eventTypeSlug: eventType.slug,
timeZone: timeZone(),
+5
View File
@@ -24,6 +24,7 @@ describe("Tests the slot logic", () => {
},
],
eventLength: 60,
organizerTimeZone: "America/Toronto",
})
).toHaveLength(24);
});
@@ -45,6 +46,7 @@ describe("Tests the slot logic", () => {
},
],
eventLength: 60,
organizerTimeZone: "America/Toronto",
})
).toHaveLength(12);
});
@@ -64,6 +66,7 @@ describe("Tests the slot logic", () => {
},
],
eventLength: 60,
organizerTimeZone: "America/Toronto",
})
).toHaveLength(0);
});
@@ -84,6 +87,7 @@ describe("Tests the slot logic", () => {
minimumBookingNotice: 0,
workingHours,
eventLength: 60,
organizerTimeZone: "America/Toronto",
})
).toHaveLength(0);
});
@@ -104,6 +108,7 @@ describe("Tests the slot logic", () => {
},
],
eventLength: 60,
organizerTimeZone: "America/Toronto",
})
).toHaveLength(11);
});