Please respect region time format on new tab
See original GitHub issueTest plan
See https://github.com/brave/brave-core/pull/3256
Description
New Tab dashboard shows time in AM/PM, even though system settings are set to 24h time.
No similar issues in brave-browser.
Similar issues in brave-laptop
:
- https://github.com/brave/browser-laptop/issues/7781
- https://github.com/brave/browser-laptop/issues/5647
- https://github.com/brave/browser-laptop/issues/11117 (All closed without solution)
Steps to Reproduce
- Change system locale to some locale that defaults to 24 time, such as Brazilian Portuguese (Mac: System Preferences > Language & Region > Preferred languages > click the plus button)
- Open Brave with New Tab
Actual result:
Expected result:
Time should match locale time (24-hour if locale defaults to it, such as pt-BR suggested in the test plan above). Switching back to locales that default to 12-hour (such as en-US) should update accordingly.
Reproduces how often:
Always
Brave version (chrome://version info)
Brave | 0.55.6 Chromium: 70.0.3538.16 (Official Build) dev (64-bit) Revision | 16ed95b41bb05e565b11fb66ac33c660b721f778-refs/branch-heads/3538@{#306} OS | Mac OS X JavaScript | V8 7.0.276.9
Reproducible on current release:
Yes, reproducible also on browser-laptop
.
Additional Information
After digging through the source code here:
https://github.com/brave/brave-core/blob/master/components/brave_new_tab_ui/components/app.tsx
I can see that brave-ui/old/clock
is being used:
https://github.com/brave/brave-ui/blob/master/src/old/clock/index.tsx
Which renders AM/PM time directly.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:20
- Comments:31 (6 by maintainers)
Top GitHub Comments
I managed to solve it by using “English United Kingdom” as language. It is better than having the 12 hour clock format.
If it is impossible to make it work by reading the locale, why not just add one of those “switches” in the settings page, where you can choose 12 or 24 hour manually?
And if not even that is possible, why not make 24 hour clock standard? There are only a few countries in the world where microsoft standard is 12 hour.
This is still an issue on Windows 10 Pro 1909 (18363.476) in Version 1.0.0 Chromium: 78.0.3904.97 (Official Build) (64-bit). At 15:18 the new tab page is still showing 3:18.