<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>196894</bug_id>
          
          <creation_ts>2019-04-13 02:36:38 -0700</creation_ts>
          <short_desc>Date parses time-and-time string without timezone incorrectly</short_desc>
          <delta_ts>2020-01-03 15:19:23 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Safari 12</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>89071</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="T.J. Crowder">tj</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>msaboff</cc>
    
    <cc>ross.kirsling</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1527028</commentid>
    <comment_count>0</comment_count>
    <who name="T.J. Crowder">tj</who>
    <bug_when>2019-04-13 02:36:38 -0700</bug_when>
    <thetext>JavaScriptCore parses dates in this format incorrectly, because there&apos;s no timezone indicator but there is a time portion:


```js
new Date(&quot;2019-04-13T09:00:00&quot;)
```

It should parse it in _local time_, but parses it as UTC instead. V8, SpiderMonkey, and Chakra parse it correctly. This fiddle demonstrates the problem: https://jsfiddle.net/tjcrowder/ojmh3fsv/2/

The rules changed between ES2015 and ES2016 but have been stable since. Current rules are here: https://tc39.github.io/ecma262/#sec-date.parse

&gt; When the UTC offset representation is absent, date-only forms are
&gt; interpreted as a UTC time and date-time forms are interpreted as
&gt; a local time.

This bug is similar to #89071 but that report (from 2012) is severely outdated now, not least because it predates this being added to the specification. (I believe #89071 can be closed as some form of &quot;no longer relevant.&quot; Or if not, this can be made a duplicate of that and we can update its description.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527082</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-04-13 20:14:23 -0700</bug_when>
    <thetext>&lt;rdar://problem/49882137&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1602609</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2020-01-03 15:19:23 -0800</bug_when>
    <thetext>Closing as duplicate, since bug 89071 comment 2 provides the updated spec context you mentioned.

*** This bug has been marked as a duplicate of bug 89071 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>