From a3c5156b2fe8168121f4ff90b6e5d1206750f82c Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Fri, 24 Apr 2026 19:11:52 -0300 Subject: [PATCH 1/2] feat: add canonicalizeTimezone function and update timezone handling in settings --- apps/meteor/client/hooks/useTimezoneNameList.ts | 3 ++- .../Setting/inputs/SelectTimezoneSettingInput.tsx | 3 ++- .../views/omnichannel/businessHours/EditBusinessHours.tsx | 3 ++- packages/tools/src/timezone.ts | 8 ++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/meteor/client/hooks/useTimezoneNameList.ts b/apps/meteor/client/hooks/useTimezoneNameList.ts index e51d8812ac2c9..2cb37b7843523 100644 --- a/apps/meteor/client/hooks/useTimezoneNameList.ts +++ b/apps/meteor/client/hooks/useTimezoneNameList.ts @@ -2,7 +2,8 @@ import { useMemo } from 'react'; const getTimeZoneNames = (): string[] => { const intl = Intl as typeof Intl & { supportedValuesOf?(key: 'timeZone'): string[] }; - return typeof intl.supportedValuesOf === 'function' ? intl.supportedValuesOf('timeZone') : []; + const names = typeof intl.supportedValuesOf === 'function' ? intl.supportedValuesOf('timeZone') : []; + return names.includes('UTC') ? names : ['UTC', ...names]; }; export const useTimezoneNameList = (): string[] => useMemo(() => getTimeZoneNames(), []); diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/SelectTimezoneSettingInput.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/SelectTimezoneSettingInput.tsx index 9db35413302f6..8008be82d8f06 100644 --- a/apps/meteor/client/views/admin/settings/Setting/inputs/SelectTimezoneSettingInput.tsx +++ b/apps/meteor/client/views/admin/settings/Setting/inputs/SelectTimezoneSettingInput.tsx @@ -1,4 +1,5 @@ import { Field, FieldHint, FieldLabel, FieldRow, Select } from '@rocket.chat/fuselage'; +import { canonicalizeTimezone } from '@rocket.chat/tools'; import type { ReactElement } from 'react'; import { useTimezoneNameList } from '../../../../../hooks/useTimezoneNameList'; @@ -38,7 +39,7 @@ function SelectTimezoneSettingInput({