[Webkit-unassigned] [Bug 238626] New: Date parse error with ISO 8601 date+time input, whitespace delimited time (YYYY-MM-DD HH:mm:ss)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 31 12:29:21 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=238626
Bug ID: 238626
Summary: Date parse error with ISO 8601 date+time input,
whitespace delimited time (YYYY-MM-DD HH:mm:ss)
Product: WebKit
Version: Safari 15
Hardware: iPhone / iPad
OS: iOS 15
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: strarsis at gmail.com
On `iOS`/`iPad` Safari browser engine the JavaScript `Date` fails to parse `ISO 8601` date+time inputs where the date and time are delimited by a white-space instead of the `T` character (e.g. `2022-03-22 17:51:57`):
The `Date` constructor fails with `Invalid date format`.
The usage of a white-space as delimiter between date and time isn't specified by ISO 8601, but is allowed by the RFC that is mostly used on the web.
Most Browsers and JavaScript libraries support and output `ISO 8601` formatted dates with date+time delimited by a white-space (`Chrome` (`Blink`/`Chromium`); `Firefox` (`Gecko`); `FeathersJS`; ...).
Code demonstration: `new Date('2022-03-22 17:51:57')`
Live demonstration: https://playcode.io/879708/
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220331/cbe2a404/attachment.htm>
More information about the webkit-unassigned
mailing list