New date time of day wrong depending on constructor format.
Reported by
bert.ljp...@gmail.com,
Jan 9 2018
|
|||
Issue description
Chrome Version : 63.0.3239.132 (Developer Build) (64-bit)
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Firefox: OK (errors with "Invalid date")
What steps will reproduce the problem?
(1) In the javascript console, type new Date("2018/03/02")
(2) Then type new Date("2018-03-02")
What is the expected result?
I expect both results to create the same date, for midnight (local time) March second.
What happens instead?
The latter form is off by one our, with its time set to 1AM. My timezone is Amsterdam, but that shouldn't matter.
,
Jan 10 2018
Thanks for filing the issue! Able to reproduce the issue on reported chrome version 63.0.3239.132 and on the latest canary 65.0.3315.0 using Windows 10, Ubuntu 14.04 and Mac 10.13.1. Checked the issue by changing the time zone to Amsterdam. As the issue is seen from M50(50.0.2634.0) hence considering it as non-regression and marking it as Untriaged.
,
Jan 10 2018
I see the time value being different in other browser as well. There should be some specification that details date string parsing - but I am not able to point it out at this time. |
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Jan 10 2018