Closed
Bug 698334
Opened 14 years ago
Closed 14 years ago
Date.parse() incorrectly parses ISO8601 datetimes without a timezone
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
WONTFIX
People
(Reporter: philor, Assigned: philor)
References
Details
Attachments
(1 obsolete file)
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•14 years ago
|
||
Assignee: general → philringnalda
Status: NEW → ASSIGNED
Attachment #570613 -
Flags: review?(jwalden+bmo)
| Assignee | ||
Comment 2•14 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•14 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•14 years ago
|
Attachment #570613 -
Attachment is obsolete: true
Attachment #570613 -
Flags: review?(jwalden+bmo)
| Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Comment 4•14 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.
Description
•