Last Comment Bug 698334 - Date.parse() incorrectly parses ISO8601 datetimes without a timezone
: Date.parse() incorrectly parses ISO8601 datetimes without a timezone
Status: VERIFIED WONTFIX
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Phil Ringnalda (:philor)
:
Mentors:
Depends on:
Blocks: 430930 695345
  Show dependency treegraph
 
Reported: 2011-10-30 22:16 PDT by Phil Ringnalda (:philor)
Modified: 2011-11-01 04:41 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix v.1 (6.07 KB, patch)
2011-10-30 23:02 PDT, Phil Ringnalda (:philor)
no flags Details | Diff | Splinter Review

Description Phil Ringnalda (:philor) 2011-10-30 22:16:16 PDT
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.
Comment 1 Phil Ringnalda (:philor) 2011-10-30 23:02:26 PDT
Created attachment 570613 [details] [diff] [review]
fix v.1
Comment 2 Phil Ringnalda (:philor) 2011-10-31 00:13:01 PDT
Ah, interesting, I see that the edition 6 draft is explicit about saying that it is a local time rather than UTC.
Comment 3 Mozilla RelEng Bot 2011-10-31 03:40:19 PDT
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
Comment 4 Ben Bucksch (:BenB) 2011-11-01 04:41:34 PDT
good that the spec now says local time. That makes sense, and that's what we do.
VERIFIED WONTFIX.

Note You need to log in before you can comment on or make changes to this bug.