Skip to content

regression: timezone field blank for legacy aliases#40305

Draft
dougfabris wants to merge 2 commits intorelease-8.4.0from
fix/timezone-legacy-aliases
Draft

regression: timezone field blank for legacy aliases#40305
dougfabris wants to merge 2 commits intorelease-8.4.0from
fix/timezone-legacy-aliases

Conversation

@dougfabris
Copy link
Copy Markdown
Member

@dougfabris dougfabris commented Apr 24, 2026

Proposed changes (including videos or screenshots)

Summary

Restores compatibility for legacy timezone aliases (UTC, Etc/UTC, US/Pacific, Japan, …) that were lost when #40076 migrated the timezone list from moment.tz.names() (597 zones) to Intl.supportedValuesOf('timeZone') (418 zones). Any Select fed by useTimezoneNameList — Business Hours and the admin Timezone setting — rendered empty for workspaces whose saved value was one of the 179 dropped aliases.

  • Add canonicalizeTimezone in @rocket.chat/tools — resolves legacy aliases to their canonical IANA zone via Intl.DateTimeFormat, falling back to the input on invalid values.
  • Ensure UTC is always present in useTimezoneNameList, since Intl.supportedValuesOf omits it on several ICU versions.
  • Apply canonicalization when loading the saved value in EditBusinessHours and SelectTimezoneSettingInput, so existing documents render correctly and are gradually rewritten to canonical form on save.

Test plan

  • On a workspace with a Business Hour saved as timezone.name === "UTC" (pre-8.4), open it on this branch — field shows UTC, save persists UTC.
  • Repeat with US/Pacific — field shows America/Los_Angeles, saves as America/Los_Angeles.
  • Admin → General → Timezone: a legacy-aliased value loads into the select.

Issue(s)

Steps to test or reproduce

Further comments

CORE-2135

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Apr 24, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

⚠️ No Changeset found

Latest commit: 9b69d16

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8110eddc-0760-4f9f-b5c0-3f2e4baeca1f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dougfabris dougfabris added this to the 8.4.0 milestone Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.97%. Comparing base (92dbb53) to head (9b69d16).
⚠️ Report is 1 commits behind head on release-8.4.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.4.0   #40305      +/-   ##
=================================================
+ Coverage          69.74%   69.97%   +0.22%     
=================================================
  Files               3298     3299       +1     
  Lines             119292   120106     +814     
  Branches           21469    21499      +30     
=================================================
+ Hits               83206    84043     +837     
+ Misses             32785    32776       -9     
+ Partials            3301     3287      -14     
Flag Coverage Δ
e2e 59.65% <25.00%> (-0.02%) ⬇️
e2e-api 46.23% <ø> (-0.04%) ⬇️
unit 70.82% <10.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant