Fixes: Get minutes offset from start of the day over days.utc() (#1488)

* Use days start of the day offset minutes over days.utc()

* We do not need to set startOf("day") as day.utc() already starts from the beginning of the day with respective +h value

* do not use startOf if the invite date is already set with utc value, otherwise, it will double the utc +h * 2

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Manjunath Reddyandkodiakhq[bot] authored and GitHub committed 2022-01-17 20:15:19 +00:00
1 parent 103877737e
commit 2289c68979
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ it("can fit 24 hourly slots for an empty day", async () => {
// 24h in a day.
expect(
getSlots({
inviteeDate: dayjs.utc().add(1, "day").startOf("day"),
inviteeDate: dayjs.utc().add(1, "day"),
frequency: 60,
minimumBookingNotice: 0,
workingHours: [