New issue
Advanced search Search tips

Issue 862084 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 860254
Owner: ----
Closed: Jul 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Date constructor gives wrong date when passed milliseconds less than -2871681132000 epoch time

Reported by s24andr...@gmail.com, Jul 10

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. console.log(new Date(-2871681132000).toString()) //this works fine
2. console.log(new Date(-2871681132001).toString()) // should be one second before

What is the expected behavior?
Result from Edge:

"Tue Dec 31 1878 23:47:48 GMT+0100 (W. Europe Standard Time)"

"Tue Dec 31 1878 23:47:47 GMT+0100 (W. Europe Standard Time)"

Result from Firefox:

"Tue Dec 31 1878 23:47:48 GMT+0100 (W. Europe Standard Time)"

"Tue Dec 31 1878 23:47:47 GMT+0100 (W. Europe Standard Time)"

What went wrong?
Result in Chrome:

"Tue Dec 31 1878 23:48:02 GMT+0100 (centraleuropeisk normaltid)"

"Tue Dec 31 1878 23:59:59 GMT+0112 (centraleuropeisk normaltid)"

Did this work before? N/A 

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 10.0
Flash Version:
 
Cc: js...@chromium.org
Components: -Blink Blink>JavaScript
I am also seeing this issue with Chrome 67:
new Date(-62135524800000)
results in :
Mon Jan 01 0001 12:07:02 GMT-0752 (Pacific Standard Time)
Labels: Needs-Triage-M67
Labels: Triaged-ET
Mergedinto: 860254
Status: Duplicate (was: Unconfirmed)
Reporter@ thanks for the issue.

This issue looks to be similar to  issue 860254 . Hence merging this issue to  issue 860254 .
Please feel free to undupe if it is not applicable.

Thanks..

Sign in to add a comment