DateTimeFormat doesn't track current time zone

NEW
Unassigned

Status

()

Core
JavaScript Engine
5 years ago
3 months ago

People

(Reporter: Norbert Lindenberg, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 2 bugs)

Trunk
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
According to ECMA-402, section 6.4, Intl.DateTimeFormat uses the host environment’s current time zone if no time zone is provided to the constructor. Bug 796523 enabled the implementation of Date objects to track the operating system's time zone, but DateTimeFormat doesn't do that yet. As a result, toString and toLocaleString (with no time zone specified) can produce output reflecting different time zones at the same time. This can be observed, for example, with the test case at
http://norbertlindenberg.com/ecmascript/DateTest.html
See also
https://mail.mozilla.org/pipermail/es-discuss/2013-July/032087.html
(Assignee)

Updated

3 years ago
Assignee: general → nobody
Would fixing this bug also provide the current OS timezone via Intl.DateTimeFormat().resolvedOptions().timeZone ? Also a related side question, is there an event of some sort when the system timezone changes?
Blocks: 1158733
Depends on: 837961
Andre, this also seems fixed now, am I correct?
Flags: needinfo?(andrebargull)
IIRC the DateTest.html page (before it went 404) also tested the behaviour when the time zone is manually changed during the life time of a web page. We still don't have that part correctly implemented (bug 1343826), so we probably should keep this bug open.
Depends on: 1343826
Flags: needinfo?(andrebargull)
You need to log in before you can comment on or make changes to this bug.