From 0a34512e3b4bfda256c59f88c1ffe320e4536342 Mon Sep 17 00:00:00 2001
From: Alex Johansson <alexander@n1s.se>
Date: Mon, 15 Nov 2021 21:32:10 +0100
Subject: [PATCH] availability timezone fix (#1180)

---
 pages/[user]/[type].tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsx
index 7d3a0ce8..2b8c0b1d 100644
--- a/pages/[user]/[type].tsx
+++ b/pages/[user]/[type].tsx
@@ -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;