From 5ebd33576a8f321af3db89ff45f4be488a7f0a8e Mon Sep 17 00:00:00 2001 From: Hemant M Mehta <92446645+hemantmm@users.noreply.github.com> Date: Sun, 31 Aug 2025 13:50:19 +0530 Subject: [PATCH] fix: timezone-dropdown (#23469) * fix: timezone-dropdown closes: #23453 * coderabbit suggestion Signed-off-by: Hemant M Mehta * Update timezone.ts --------- Signed-off-by: Hemant M Mehta Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> --- packages/lib/timezone.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib/timezone.ts b/packages/lib/timezone.ts index 3c74df8273..9fd3eaac13 100644 --- a/packages/lib/timezone.ts +++ b/packages/lib/timezone.ts @@ -28,7 +28,7 @@ const formatOffset = (offset: string) => offset.replace(/^([-+])(0)(\d):00$/, (_, sign, _zero, hour) => `${sign}${hour}:00`); export const handleOptionLabel = (option: ITimezoneOption, timezones: Timezones) => { - const offsetUnit = option.label.split("-")[0].substring(1); + const offsetUnit = option.label.split(/[-+]/)[0].substring(1); const cityName = option.label.split(") ")[1]; const timezoneValue = ` ${offsetUnit} ${formatOffset(dayjs.tz(undefined, option.value).format("Z"))}`;