The default bug view has changed. See this FAQ.

Date.parse() incorrectly parses ISO8601 datetimes without a timezone

VERIFIED WONTFIX

Status

()

Core
JavaScript Engine
VERIFIED WONTFIX
6 years ago
6 years ago

People

(Reporter: philor, Assigned: philor)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

(Assignee)

Description

6 years ago
Judging by the discussion in bug 430930, at the time ES5 had not yet gotten around to including the language now in 15.9.1.15, "The value of an absent time zone offset is "Z"." Because that wasn't specified, but 15.9.4.2 said (as it still does, now incompatibly with 15.9.1.15) "The String may be interpreted as a local time, a UTC time, or a time in some other time zone, depending on the contents of the String.", bug 430930 decided that the only way a String could be interpreted as a local time would be to treat an absent time zone offset as local.

Unfortunately, 15.9.1.15 is explicit about saying it is not, and 15.9.4.2 says "first attempts to parse the format of the String according to the rules called out in Date Time String Format (15.9.1.15)" so what we are doing now, treating 20111030T22:13:00 as a local time, is wrong.
(Assignee)

Comment 1

6 years ago
Created attachment 570613 [details] [diff] [review]
fix v.1
Assignee: general → philringnalda
Status: NEW → ASSIGNED
Attachment #570613 - Flags: review?(jwalden+bmo)
(Assignee)

Updated

6 years ago
Blocks: 695345
(Assignee)

Comment 2

6 years ago
Ah, interesting, I see that the edition 6 draft is explicit about saying that it is a local time rather than UTC.

Comment 3

6 years ago
Try run for 566fe84e57ca is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=566fe84e57ca
Results (out of 33 total builds):
    success: 31
    warnings: 1
    failure: 1
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/philringnalda@gmail.com-566fe84e57ca
(Assignee)

Updated

6 years ago
Attachment #570613 - Attachment is obsolete: true
Attachment #570613 - Flags: review?(jwalden+bmo)
(Assignee)

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX

Comment 4

6 years ago
good that the spec now says local time. That makes sense, and that's what we do.
VERIFIED WONTFIX.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.