Closed Bug 1266290 Opened 9 years ago Closed 9 years ago

Intl.DateTimeFormat should allow IANA timezone names to be used

Categories

(Core :: JavaScript: Internationalization API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sites+mozilla, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36 Steps to reproduce: In the original Intl spec (ECMA-402) which is currently implemented in Firefox, supporting timezones other than UTC was optional. However, in the latest versions of the spec (both the released 2.0 and the draft 4.0), it is mandatory to accept IANA timezone names. References: Old spec, 12.1.1.1 InitializeDateTimeFormat, step 16c: http://www.ecma-international.org/ecma-402/1.0/#sec-12.1.1.1 New spec, 12.1.1 InitializeDateTimeFormat, steps 19c and 19d: http://www.ecma-international.org/ecma-402/2.0/#sec-InitializeDateTimeFormat To reproduce, execute this in the console: new Intl.DateTimeFormat('en-US', {timeZone: 'Australia/Sydney', timeZoneName: 'long'}).format() Actual results: Error thrown: RangeError: invalid time zone in DateTimeFormat(): AUSTRALIA/SYDNEY Expected results: Return a string similar to "4/21/2016, Australian Eastern Standard Time"
Component: Untriaged → JavaScript: Internationalization API
Product: Firefox → Core
Firefox is losing points in http://kangax.github.io/compat-table/esintl/ because of this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Depends on: 837961
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.