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:
1 parent
103877737e
commit
2289c68979
2 files changed
+4
-4
No files matched your search
@@ -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: [
|
||||
|
||||
Reference in new issue
Block a user