Skip to content

Commit 5ebd335

Browse files
hemantmmanikdhabal
andauthored
fix: timezone-dropdown (calcom#23469)
* fix: timezone-dropdown closes: calcom#23453 * coderabbit suggestion Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com> * Update timezone.ts --------- Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
1 parent 4fb3639 commit 5ebd335

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/lib/timezone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const formatOffset = (offset: string) =>
2828
offset.replace(/^([-+])(0)(\d):00$/, (_, sign, _zero, hour) => `${sign}${hour}:00`);
2929

3030
export const handleOptionLabel = (option: ITimezoneOption, timezones: Timezones) => {
31-
const offsetUnit = option.label.split("-")[0].substring(1);
31+
const offsetUnit = option.label.split(/[-+]/)[0].substring(1);
3232
const cityName = option.label.split(") ")[1];
3333

3434
const timezoneValue = ` ${offsetUnit} ${formatOffset(dayjs.tz(undefined, option.value).format("Z"))}`;

0 commit comments

Comments
 (0)