[Webkit-unassigned] [Bug 89071] New: JavaScript: Invalid date parse for ISO 8601 strings when no timezone given

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 14 01:03:45 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89071

           Summary: JavaScript: Invalid date parse for ISO 8601 strings
                    when no timezone given
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: doochik at ya.ru


Standard: http://dotat.at/tmp/ISO_8601-2004_E.pdf
4.3.2: The zone designator is empty if use is made of local time in accordance with 4.2.2.2 through 4.2.2.4, it is the UTC designator [Z] if use is made of UTC of day in accordance with 4.2.4 and it is the difference-component if use is made of local time and the difference from UTC in accordance with 4.2.5.2.

My timezone is UTC+4, so date without timezone must be parsed as localtime.
Example: 2012-06-14T05:00:00 -> 2012-06-14T05:00:00+04:00 -> 2012-06-14T01:00:00Z

valid result (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0):
new Date('2012-06-14T05:00:00').toISOString() -> "2012-06-14T01:00:00.000Z"

invalid result (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5):
new Date('2012-06-14T05:00:00').toISOString() -> "2012-06-14T05:00:00.000Z"

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list