Add time format preference with system, 12, and 24 options #7616
+184
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First time contributor checklist:
Contributor checklist:
mainbranchpnpm run readyrun passes successfully (more about tests here) -check:typesfails due toToastManager.dom.tsx, potentially related to 5bde700, but this is also failing on main so unrelated to this PR.Description
This pull request aims to add a
Time formatpreference withsystem,12, and24options so that users can either leave it up to their locale to specify the time format (system) or manually select either12or24themselves. The preference should appears directly belowLanguageand aboveTheme.As for the implementation, the one thing that is currently bothering me a bit is the existence of both
HourCyclePreferenceandHourCycleSetting. Unfortunately as the former is already in use for the original 24 hour macOS support implementation, shown below, we cannot settle on just one without refactoring the existing code. 🤔Signal-Desktop/ts/types/I18N.std.ts
Lines 37 to 41 in 90c0fc7
Sort of a follow up to 1143c0e, which added 24 hour time format for macOS.
Resolves #4079 (exactly)
Resolves #4252 (sort of, not exactly)
Testing
I added test coverage for this new preference. Additionally I tried running the app locally on my Fedora Workstation 43 (GNOME 49) system but unfortunately I'm seeing some GTK error with the local build. Not sure if that's due to an issue on my end or not.
Screencast.From.2025-11-24.18-14-59.mp4