From 26e8582302bb0614508c3c7c1ab987b5c917d1ac Mon Sep 17 00:00:00 2001 From: chauhan_s Date: Wed, 19 Nov 2025 16:33:14 +0530 Subject: [PATCH] fix: use UTC parsing for recurring booking dates to prevent timezone conversion issues (#25235) Replace dayjs.tz() with dayjs.utc() when parsing recurring booking date strings to ensure dates are interpreted as UTC timestamps rather than being converted to the specified timezone. This prevents incorrect date/time display when the dateStr is already in UTC format. --- apps/web/modules/bookings/views/bookings-single-view.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx index 6c3c35e8de..fc0156d4ec 100644 --- a/apps/web/modules/bookings/views/bookings-single-view.tsx +++ b/apps/web/modules/bookings/views/bookings-single-view.tsx @@ -1207,7 +1207,7 @@ function RecurringBookings({ {eventType.recurringEvent?.count && recurringBookingsSorted.slice(0, 4).map((dateStr: string, idx: number) => (
- {formatToLocalizedDate(dayjs.tz(dateStr, tz), language, "full", tz)} + {formatToLocalizedDate(dayjs.utc(dateStr), language, "full", tz)}
{formatToLocalizedTime({ date: dayjs(dateStr), @@ -1225,7 +1225,7 @@ function RecurringBookings({ timeZone: tz, })}{" "} - ({formatToLocalizedTimezone(dayjs(dateStr), language, tz)}) + ({formatToLocalizedTimezone(dayjs.utc(dateStr), language, tz)})
))} @@ -1240,7 +1240,7 @@ function RecurringBookings({ {eventType.recurringEvent?.count && recurringBookingsSorted.slice(4).map((dateStr: string, idx: number) => (
- {formatToLocalizedDate(dayjs.tz(dateStr, tz), language, "full", tz)} + {formatToLocalizedDate(dayjs.utc(dateStr), language, "full", tz)}
{formatToLocalizedTime({ date: dayjs(dateStr), @@ -1256,7 +1256,7 @@ function RecurringBookings({ timeZone: tz, })}{" "} - ({formatToLocalizedTimezone(dayjs(dateStr), language, tz)}) + ({formatToLocalizedTimezone(dayjs.utc(dateStr), language, tz)})
))}