New issue
Advanced search Search tips

Issue 819686 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 602567
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Problem with new Date in JavaScript, Daylight wrong

Reported by gustavow...@gmail.com, Mar 7 2018

Issue description

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

Steps to reproduce the problem:
1. Change your time zone for brazilian time zone, from brasilia
2. Open Chrome, press f12;
3. Creating new object Date. (new Date(2017,9,22))

What is the expected behavior?
The object was expected to return the date:
Sun Oct 22 2017 00:00:00 GMT-0300 (Horário brasileiro de verão) 

What went wrong?
However, the date came as standard 01:00:00, indicating that Brazilian daylight saving time began on this day, but daylight savings time did not start on that day.

Return:
Sun Oct 22 2017 01:00:00 GMT-0200 (Horário brasileiro de verão)

Did this work before? N/A 

Chrome version: 65.0.3325.146  Channel: stable
OS Version: 10.0
Flash Version: 

Creating a new 'Date' object in JavaScript brings me to the wrong date, which is the beginning of Brazilian summer time, but the start of daylight saving time was not on the date entered.

Event:

WRONG
new Date (2017,9,22);
Returns: Sun Oct 22 2017 01:00:00 GMT-0200 (Horário brasileiro de verão)

HOW IT SHOULD BE
new Date (2017,9,22);
Returns: Sun Oct 22 2017 00:00:00 GMT-0200 (Horário brasileiro de verão)

If I return the date to a year ago (03-07-2017), the date returned is correct.

Environment:
Google Chrome Beta - Version 65.0.3325.106 (Official version) 64-bit beta
Google Chrome Canary - Version 67.0.3364.0 (Official version) canary 64-bit
Google Chrome - Version 65.0.3325.146 (Official release) 64-bit

Brazilian summer time in 2017 started on October 15, 2017, so the Date object (2017,9,22) should bring me time 00:00:00, but the time returned is 01:00: 00

I await a position on the reported problem.
E-mail: gustavowestarb45@gmail.com
Regards,
Gustavo Westarb.
 
date2018.PNG
47.5 KB View Download
Labels: Needs-Triage-M65
Components: -Blink Blink>JavaScript
Labels: Triaged-ET Needs-Feedback
Able to reproduce the issue on chrome reported version 65.0.3325.146 using windows-10 with steps mentioned below:
1) Launched chrome reported version and changed time zone to brasilia
2) Opened Devtools > Console and entered new Date(2017,9,22), it returns "Sun Oct 22 2017 01:00:00 GMT-0200 (Local Daylight Time)"
Observations:
In comment#0, under "expected behaviour" section it shows: Sun Oct 22 2017 00:00:00 GMT-0300 (Horário brasileiro de verão) but
under "HOW IT SHOULD BE" section it is showing as: Sun Oct 22 2017 00:00:00 GMT-0200 (Horário brasileiro de verão), where it is showing two different time zones(GMT-0300 & GMT-0200).

@Reporter:
Tested the issue on Windows, Mac and Linux, please find the attached screenshot for your reference and could you please let us know what is the excepted behaviour of the issue and we observed some different behaviour in Linux and Mac(find the attached for the same).

Thanks!

Windows - 819686.PNG
476 KB View Download
Mac - 819686.png
208 KB View Download
Linux - 819686.png
263 KB View Download
There really was a mistake about the items reported in their remarks.
The expected behavior was: Sun Oct 22 2017 00:00:00 GMT-0200 (Horário brasileiro de verão).

Note:
Other browsers like (Edge, IE and Firefox) the problem does not occur. Opera and Chrome happens, since both use Blink.

Regarding your request, do I need to do the tests on other operating systems or only its attachments suffice to understand that the problem only occurs in windows?

Is there any palliative solution to the problem?

Regards,
Gustavo Westarb.
Project Member

Comment 5 by sheriffbot@chromium.org, Mar 8 2018

Cc: viswa.karala@chromium.org
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
Cc: susan.boorgula@chromium.org
Labels: M-67 Target-67 FoundIn-67 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
gustavowestarb45@ Thanks for the update.

Re-tested the issue on Mac OS 10.12.6, Windows 10 and Ubuntu 14.04 on the latest canary 67.0.3366.0 and Stable 65.0.3325.146 and able to reproduce the issue.

On executing the command 'new Date(2017,9,22)' on Console can see the output as 'Sun Oct 22 2017 01:00:00 GMT-0200 (Local Daylight Time)'.
Attached is the screen shot for reference.

This is a Non-Regression issue as this behavior is observed from M60 Chrome builds. 
Hence marking this as Untriaged for further updates from Dev.

Thanks..
819686-M60.PNG
157 KB View Download
Components: -Blink>JavaScript Blink>JavaScript>Internationalization
Status: Available (was: Untriaged)
Cc: js...@chromium.org
 Issue 821842  has been merged into this issue.

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

Mergedinto: 602567
Status: Duplicate (was: Available)
This was fixed in 67-to-be. 

 susan.boorgula@: are you sure you can reproduce it in 67 canary? 


Sign in to add a comment