Steps to reproduce: - Set your system'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
We'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'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 "Safari on iPhone 7 iOS 12.1 and mac mini with macOS High Sierra and Safari 12.0.1."
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).
<rdar://problem/48913742>