Bug 188001
| Summary: | Erroneous date calculation when daylight savings transition occurs during midnight | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Tiago Engel <tiagohngl> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ap, beidson, fpizlo, h, msaboff, splaktar, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 11 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Tiago Engel
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
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Prentice
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."
Michael Prentice
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).
Radar WebKit Bug Importer
<rdar://problem/48913742>