Issue metadata
Sign in to add a comment
|
Time zone offset incorrect in EST for `new Date(1754, 0, 1)`
Reported by
ed.mo...@gmail.com,
Jun 12 2018
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36 Steps to reproduce the problem: 1. Be in Eastern Standard Time Zone 2. In Chrome dev tools console, type these commands. 3. `var d = new Date(1754, 0, 5)` 4. `JSON.stringify(d)` 5. `d.getTimezoneOffset()` What is the expected behavior? JSON stringify: "1754-01-05T05:00:00.000Z" getTimezoneOffset: 300 What went wrong? Actual results JSON stringify: "1754-01-05T04:56:02.000Z" getTimezoneOffset: 296 Did this work before? Yes 66.0.3359.181 Chrome version: 67.0.3396.79 Channel: n/a OS Version: 10.0 Flash Version: This caused a really fun bug with an incorrect date being used in a query in a web application. Midnight one day turned into the previous day. You may wonder, "Why is a date from 1754 being used?" That is a great question. Works as expected in Google Chrome version 66.0.3359.181. Broken in version 67.0.3396.87 |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by js...@chromium.org
, Jun 12 2018