Open Bug 1827069 Opened 2 years ago Updated 2 years ago

Time zone doesn't reflect DST on FreeBSD unless $TZ is set

Categories

(Core :: Internationalization, defect, P3)

Firefox 112
Unspecified
FreeBSD
defect

Tracking

()

UNCONFIRMED

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.

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.

Component: Untriaged → Internationalization
Product: Firefox → Core

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.

Flags: needinfo?(m_kato)

not tier-1 platform.

Severity: -- → S3
Flags: needinfo?(m_kato)
OS: Unspecified → FreeBSD
Priority: -- → P3

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.

You need to log in before you can comment on or make changes to this bug.