<?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>188001</bug_id>
          
          <creation_ts>2018-07-25 06:13:55 -0700</creation_ts>
          <short_desc>Erroneous date calculation when daylight savings transition occurs during midnight</short_desc>
          <delta_ts>2019-03-14 20:26:21 -0700</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 11</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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="Tiago Engel">tiagohngl</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>fpizlo</cc>
    
    <cc>h</cc>
    
    <cc>msaboff</cc>
    
    <cc>splaktar</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1445009</commentid>
    <comment_count>0</comment_count>
    <who name="Tiago Engel">tiagohngl</who>
    <bug_when>2018-07-25 06:13:55 -0700</bug_when>
    <thetext>Steps to reproduce:

- Set your system&apos;s timezone to BRT (Brasilia time)
- type in new Date(2018, 10, 4) in the console

Expected result (this is what latest Chrome and Firefox return):
Sun Nov 04 2018 01:00:00 GMT-0200 (-02)

Actual result:
Sat Nov 03 2018 23:00:00 GMT-0300 (-03)

The same thing happens when calling `setHours(0, 0, 0, 0)` on `Nov 04 2018`. It goes back to `Nov 3 2018`.


V8 bug: https://bugs.chromium.org/p/v8/issues/detail?id=3116</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1516598</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Prentice">splaktar</who>
    <bug_when>2019-03-14 13:09:26 -0700</bug_when>
    <thetext>We&apos;ve had reports of this from users of AngularJS Material as well. Some additional details can be found in https://github.com/angular/material/issues/11506. It&apos;s a pretty serious issue for users of Safari on macOS and iOS in Brazil.

Also from that issue you can find that:
This issue is still a problem on &quot;Safari on iPhone 7 iOS 12.1 and mac mini with macOS High Sierra and Safari 12.0.1.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1516603</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Prentice">splaktar</who>
    <bug_when>2019-03-14 13:13:07 -0700</bug_when>
    <thetext>DST ended in Brazil on Feb 17th, 2019, but this will be a problem again on Nov 3rd, 2019 when Brazilian DST starts again (reference https://www.timeanddate.com/time/change/brazil).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1516870</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-03-14 20:26:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/48913742&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>