Repository navigation
Localize time zone names - #105880
Localize time zone names#105880
Conversation
Pass the app's language to getZoneAbbreviation so each language uses its own name for the zone. English zone names are unchanged. The local time on profiles, the scheduled call in the onboarding help dropdown and the schedule call confirmation now pass the locale.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
The z tokens name the zone through Intl in the locale's language, so they need the user's locale. The O offset tokens read the same in every language and are left out.
|
@linhvovan29546 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 097301dfe5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Plain date-fns writes a GMT offset for the z tokens in every language; only date-fns-tz names the zone through Intl in the locale's language.
|
@shubham1206agra Conflicts |
…calize-dates-zone-names # Conflicts: # eslint-plugin-local-rules/require-locale-for-localized-date-format.js # tests/unit/DateUtilsTest.ts # tests/unit/RequireLocaleForLocalizedDateFormatRuleTest.ts
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-11-07.at.18.06.41.mov |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.34-0 🚀
|
|
No FullStory changes needed — this PR only fixes timezone-name localization in existing UI and adds lint/test coverage, without introducing new interactions, screens, user-property values, or sensitive content. |
|
No help site update needed — this fixes timezone names to match the selected language without adding a workflow or making existing article instructions incorrect. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.34-1 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
DateUtils.getZoneAbbreviationnamed the user's timezone without a locale, so the zone name was always the English one, for exampleEDTorGMT+2, in every language.It now passes the app's selected language to date-fns-tz, which gets the zone name from
Intl. Each language then uses its own name for the zone:Places updated:
AutoUpdateTime)This is one of a set of small, independent PRs that split up the date-localization work in #105846. They can merge in any order.
Update: lint rule covers timezone names
The
require-locale-for-localized-date-formatrule now treats the timezone name tokens (z,zz,zzz,zzzz) as language-dependent, sinceIntlnames the zone in the locale's language: New York readsEDTin English,GMT-4in German andUTC−4in French. TheOandOOOOoffset tokens readGMT-4in every language, so they are not included.getZoneAbbreviationwas the only call that formatted a zone name, and this PR already passes the locale to it, so the rule finds no other violations.tests/unit/RequireLocaleForLocalizedDateFormatRuleTest.tscovers both cases.Fixed Issues
$ #98088
PROPOSAL:
Tests
MESZin summer).GMT+2).Offline tests
Same as tests.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos