Bug 1848615 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I noticed that `new Intl.DateTimeFormat().resolvedOptions().timeZone` returns `Europe/Oslo` on websites such as jsconsole.com, instead of `Europe/Berlin` like in the browser console.

This seems to be caused by [`icu::TimeZone::detectHostTimeZone`](https://searchfox.org/mozilla-central/rev/da1e39f50ef43145623938141c970437b226da9e/intl/components/src/TimeZone.cpp#368) returning a different timezone in content processes.

In the parent process `detectHostTimeZone()` returns `Europe/Berlin`, but in the content process it's `Arctic/Longyearbyen`, which is later canonicalized to `Europe/Oslo` by [`tryCanonicalizeTimeZoneConsistentWithIANA`](https://searchfox.org/mozilla-central/rev/da1e39f50ef43145623938141c970437b226da9e/js/src/builtin/intl/DateTimeFormat.cpp#368).
I noticed that `new Intl.DateTimeFormat().resolvedOptions().timeZone` returns `Europe/Oslo` on websites such as jsconsole.com, instead of (correctly) `Europe/Berlin` like in the browser console.

This seems to be caused by [`icu::TimeZone::detectHostTimeZone`](https://searchfox.org/mozilla-central/rev/da1e39f50ef43145623938141c970437b226da9e/intl/components/src/TimeZone.cpp#368) returning a different timezone in content processes.

In the parent process `detectHostTimeZone()` returns `Europe/Berlin`, but in the content process it's `Arctic/Longyearbyen`, which is later canonicalized to `Europe/Oslo` by [`tryCanonicalizeTimeZoneConsistentWithIANA`](https://searchfox.org/mozilla-central/rev/da1e39f50ef43145623938141c970437b226da9e/js/src/builtin/intl/DateTimeFormat.cpp#368).

Back to Bug 1848615 Comment 0