New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 825134 link

Starred by 2 users

Issue metadata

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

Blocked on:
issue v8:6031



Sign in to add a comment

Historical daylight saving time start/end date change is not taken into account on Windows

Reported by nikhilse...@gmail.com, Mar 23 2018

Issue description

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

Steps to reproduce the problem:
1. new Date("3/10/2002") => Sun Mar 10 2002 00:00:00 GMT-0500 (Eastern Standard Time)
2. new Date("3/11/2002") => Mon Mar 11 2002 00:00:00 GMT-0400 (Eastern Daylight Time) 

What is the expected behavior?
which should be Mon Mar 11 2002 00:00:00 GMT-0500 (Eastern Daylight Time)

What went wrong?
System Time Zone : (UTC -5:00) Eastern Time(US & Canada) 

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Daylight saving started in 7 Apr 2002 and ended on 27 Oct 2002
But chrome consider the daylight saving from 11-Mar-2002 to 3-Nov-2002
new Date("3/10/2002") => Sun Mar 10 2002 00:00:00 GMT-0500 (Eastern Standard Time)
new Date("3/11/2002") => Mon Mar 11 2002 00:00:00 GMT-0400 (Eastern Daylight Time) 
Expected: which should be Mon Mar 11 2002 00:00:00 GMT-0500 (Eastern Daylight Time)

new Date("11/3/2002") => Sun Nov 03 2002 00:00:00 GMT-0400 (Eastern Daylight Time)
new Date("11/4/2002") => Mon Nov 04 2002 00:00:00 GMT-0500 (Eastern Standard Time)

So whenever we enter the below date new Date("4/1/2002") in application server gives back 1 date previous => 3/31/2002
new Date("4/1/2002")  => Mon Apr 01 2002 00:00:00 GMT-0400 (Eastern Daylight Time)

Did this work before? No 

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 10.0
Flash Version:
 
Components: -Blink Blink>JavaScript

Comment 2 by ajha@chromium.org, Mar 26 2018

Labels: Needs-Triage-M65
Apart from 2002 this issue is applicable to other years too.
Cc: sindhu.chelamcherla@chromium.org
Labels: Triaged-ET M-67 Target-67 FoundIn-67 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 65.0.3325.181 using Windows 10, Ubuntu 14.04 and Mac 10.13.3. 

This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged. 
Can you please confirm the ETA to fix this issue?
Components: -Blink>JavaScript Blink>JavaScript>Internationalization
Status: Available (was: Untriaged)

Comment 7 by js...@chromium.org, Apr 9 2018

Blockedon: v8:3547 v8:6031
Labels: -OS-Linux -OS-Mac
Owner: js...@chromium.org
Status: Assigned (was: Available)
Summary: Historical daylight saving time start/end date change is not taken into account (was: Problem with new Date in JavaScript with Daylight saving)
re comment 4:

I can't reproduce it on Mac/Linux. 

Google Chrome	65.0.3325.181 (Official Build) (64-bit)
Revision	dc3469be277cc962ba01d9c0cb5bb1a265676c36-refs/branch-heads/3325@{#725}
OS	Mac OS X
JavaScript	V8 6.5.254.41

d=new Date("3/11/2002")
Mon Mar 11 2002 00:00:00 GMT-0800 (PST)
d.getTimezoneOffset()
480

d2=new Date("4/11/2002")
Thu Apr 11 2002 00:00:00 GMT-0700 (PDT)
d2.getTimezoneOffset()
420

---------

Anyway, this should be fixed in Chrome 66 even on Windows if it's only blocked by  bug v8:6031 . If it also requires  bug v8:3547 , you have to wait for Chrome 67. 

v8 6.5.254 branch does not enable 'icu-timezone-data' 
( https://chromium.googlesource.com/v8/v8.git/+/refs/heads/6.5.254/src/flag-definitions.h : icu-timezone-data flag is FALSE by default). 


Comment 8 by js...@chromium.org, Apr 9 2018

Blockedon: -v8:3547
Cc: jkummerow@chromium.org
Summary: Historical daylight saving time start/end date change is not taken into account on Windows (was: Historical daylight saving time start/end date change is not taken into account)
 nikhilsethi10@gmail.com:

try to launch Chrome with the following command line flag:

--js-flags=--icu-timee-zone-data 

I confirmed that  bug v8:6031  alone is sufficient ( bug v8:3547  is not necessary for this issue). 

So, chrome 66 will work fine (which will have v8 6.6.x). 

wait... even though  bug v8:6031  was fixed in Jan 8,  v8 6.6 branch does not have it:

https://chromium.googlesource.com/v8/v8.git/+/6.6.262/src/flag-definitions.h  (look for 'icu' ; 'icu_timezone_data' flag is still false). 

It's true in v8 6.7.x ;
https://chromium.googlesource.com/v8/v8.git/+/6.7.262/src/flag-definitions.h

If we want to fix it in 66 or 65 branch, it's a 1-line fix ('false' => 'true'). 

Comment 9 by js...@chromium.org, Apr 9 2018

jkummerow@:  I thought that branch date for v8 (a.b branch) is similar to the branch date for Chromium "ab" branch (i.e. v8 branch date for 6.6 is only a few days before Chrome's 66 branch date).  Apparently, I was completely off on that. 


#9: What you describe is correct. We are about to branch V8 6.7 for Chrome M67. As of today, there is no V8 6.7 branch (6.7 is just the version number currently associated with "master"), just like there is no Chromium 67 branch (67 is just the version number currently associated with "master"/Canary/Dev).
Thank you for the explanation and sorry for the confusion. 

It turned out that I was confused by the Date in git log (timestamp is Jan 8, 2018), but that's when I made a branch. It's not actually landed in v8 trunk until March 7. See

https://chromium-review.googlesource.com/c/v8/v8/+/857333 . 

So, it makes perfect sense that it's NOT included in 66 branch (let alone 65 branch). 


To  nikhilsethi10@gmail.com;  unless we merge this change to 66 branch (v8 6.6 branch), you have to wait until Chrome 67. 

An alternative is to use the following command line flag:

--js-flags="--icu-timezone-data"


Given that this has been broken on Windows for a long time, it'd be hard to make a case for 65/66 merge even though a fix is a simple flag change. 


Comment 13 by js...@chromium.org, Apr 10 2018

Status: Fixed (was: Assigned)
It's fixed in 67-to-be. Marking as fixed. 

Comment 14 by js...@chromium.org, Apr 24 2018

Cc: js...@chromium.org
 Issue 835652  has been merged into this issue.

Comment 15 by js...@chromium.org, Apr 24 2018

Labels: -Needs-Triage-M65

Sign in to add a comment