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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;