availability timezone fix (#1180)

This commit is contained in:
Alex Johansson
2021-11-15 21:32:10 +01:00
committed by GitHub
parent 9fd078c59d
commit 0a34512e3b

View File

@@ -159,8 +159,8 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
availability && availability.length
? availability.map((schedule) => ({
...schedule,
startTime: schedule.startTime.getUTCHours() * 60 + schedule.startTime.getUTCMinutes(),
endTime: schedule.endTime.getUTCHours() * 60 + schedule.endTime.getUTCMinutes(),
startTime: schedule.startTime.getHours() * 60 + schedule.startTime.getMinutes(),
endTime: schedule.endTime.getHours() * 60 + schedule.endTime.getMinutes(),
}))
: null;