From a28325e69a8a2202eb914797c924f210b6fd9485 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Thu, 13 Oct 2022 12:01:11 +0100 Subject: [PATCH] Adjust booking list startTime to the timeZone of the logged in user (#4984) --- .../web/components/booking/BookingListItem.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index c376c4e88e..88a120fab0 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -257,8 +257,13 @@ function BookingListItem(booking: BookingItemProps) {
{startTime}
- {dayjs(booking.startTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")} -{" "} - {dayjs(booking.endTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")} + {dayjs(booking.startTime) + .tz(user?.timeZone) + .format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")}{" "} + -{" "} + {dayjs(booking.endTime) + .tz(user?.timeZone) + .format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")}
{isPending && ( @@ -293,8 +298,13 @@ function BookingListItem(booking: BookingItemProps) {
{startTime}
- {dayjs(booking.startTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")} -{" "} - {dayjs(booking.endTime).format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")} + {dayjs(booking.startTime) + .tz(user?.timeZone) + .format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")}{" "} + -{" "} + {dayjs(booking.endTime) + .tz(user?.timeZone) + .format(user && user.timeFormat === 12 ? "h:mma" : "HH:mm")}