Time zone doesn't reflect DST on FreeBSD unless $TZ is set
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
People
(Reporter: fran, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/112.0
Steps to reproduce:
I am in the America/Denver timezone, currently "MDT"/UTC-6. Firefox is incorrectly indicating to websites that I am in "MST"/UTC-7. This can be confirmed by evaluating Intl.DateTimeFormat().resolvedOptions().timeZone and new Date().getTimezoneOffset() in any JavaScript console.
If I pass Firefox the environment variable TZ=America/Denver, it reflects the current time zone correctly.
privacy.resistFingerprinting is set to false in about:config.
Actual results:
Without $TZ set, Firefox is able to determine that my system is set (via /etc/localtime) to the America/Denver timezone (where the timezone offset is UTC-7 during Standard Time), but it does not properly apply Daylight Saving Time rules.
Expected results:
Firefox should be able to reflect my system's timezone correctly using the usual Unix facilities, in the absence of the $TZ environment variable. It's already detecting the standard-time offset, it's just not applying DST rules correctly.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Internationalization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
The severity field is not set for this bug.
:m_kato, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 3•2 years ago
|
||
not tier-1 platform.
Comment 4•2 years ago
|
||
We use ICU's API to get default locale on gtk platform. So it might be ICU4C issue.
Yes, I can confirm this is an ICU bug: icuinfo returns <param name="tz.default">MST</param>, which is the same value Firefox is reporting for Intl.DateTimeFormat().resolvedOptions().timeZone.
Furthermore, I was able to determine that the issue is that ICU is expecting /etc/localtime to be a symlink, which it is not by default on FreeBSD; if I replace /etc/localtime with a symlink to /usr/share/zoneinfo/America/Denver, the time issue is corrected in Firefox.
I'll file bugs against ICU and/or FreeBSD about this; thank you.
Description
•