New issue
Advanced search Search tips

Issue 822335 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

date.toLocaleString() does not match the time of date.toString()

Reported by js.whoo...@gmail.com, Mar 15 2018

Issue description

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

Steps to reproduce the problem:
1. var x = new Date(1049131724000);
2. console.log(x); // Mon Mar 31 2003 13:28:44 GMT-0400 (Eastern Daylight Time)
3. console.log(x.toLocaleString()); // 3/31/2003, 12:28:44 PM

What is the expected behavior?

What went wrong?
hours should be 13, not 12

Did this work before? N/A 

Chrome version: 64.0.3282.186  Channel: n/a
OS Version: 10.0
Flash Version:
 
toLocaleString.jpg
127 KB View Download
toLocaleString-edge.jpg
163 KB View Download
tested in edge with correct results

Comment 4 by woxxom@gmail.com, Mar 15 2018

According to my bisect, it is caused by icu-timezone-data (see  issue 769706 ), which was enabled and disabled in various versions of Chrome since at least 63.

Labels: Needs-Triage-M64
Components: -Blink Blink>JavaScript>Internationalization

Comment 7 by ajha@chromium.org, Mar 22 2018

Cc: js...@chromium.org
Cc: susan.boorgula@chromium.org
Labels: Triaged-ET Needs-Feedback
js.whoover@ Thanks for the issue.

Tested this issue on Windows 10 on the reproted version and the latest Canary by following the below steps.

1. Changed the system Timezone to (UTC -05:00) Eastern Time(US & Canada).
2. Launched Chrome and navigated to the link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString
3. Executed the above code and can observe the hour as 12. Same behavior is seen on Edge.
Attached is the screen cast for reference.

Request you to check and confirm if anything is missed from our end in testing the issue.

Thanks..


822335.mp4
1.5 MB View Download
susan.boorgula@ It looks like the issue has been resolved in the latest Canary build. Thanks!

See attached side-by-side screenshot:
Left: 65.0.3325.181 (Official Build) (64-bit) (cohort: Stable)
Right: 67.0.3382.0 (Official Build) canary (64-bit) (cohort: Clang-64)
toLocaleString-chrome-canary.jpg
255 KB View Download
Project Member

Comment 10 by sheriffbot@chromium.org, Mar 28 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Unconfirmed)

Sign in to add a comment