Fix- Calendar override with the wrong dates and time (#8936)

This commit is contained in:
ASHOK-SINGH
2023-05-19 07:22:26 +00:00
committed by GitHub
parent 80649c9f1a
commit 75026289fd
@@ -51,11 +51,12 @@ export const getHandler = async ({ ctx, input }: GetOptions) => {
userId: user.id,
},
});
// disabling utc casting while fetching WorkingHours
return {
id: schedule.id,
name: schedule.name,
isManaged: schedule.userId !== user.id,
workingHours: getWorkingHours({ timeZone: schedule.timeZone || undefined }, schedule.availability || []),
workingHours: getWorkingHours({ timeZone: schedule.timeZone || undefined, utcOffset: 0 }, schedule.availability || []),
schedule: schedule.availability,
availability: convertScheduleToAvailability(schedule).map((a) =>
a.map((startAndEnd) => ({