New issue
Advanced search Search tips

Issue 852091 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



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 description

UserAgent: 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
 

Comment 1 by js...@chromium.org, Jun 12 2018

Status: WontFix (was: Unconfirmed)
In 1754, there was NO standard timezone. America/New_York used LMT (Local Mean Time) based on the longitude of New York, which is NOT 75 degrees West. 

So, the offset back then was not -5hours like today. 

This is WAI. 

Sign in to add a comment