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

Issue 797216 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

JavaScript Returns Incorrect Timezone

Reported by writeblo...@gmail.com, Dec 22 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

Steps to reproduce the problem:
1. Used basic HTML / Java Script to return timezone.
2. Compared results in Safari with Chromium
3. Chromium returning incorrect timezone

What is the expected behavior?
Javascript should return correct timezone. In my case +08:00

What went wrong?
Browser returns UTC rather than WST

Did this work before? Yes 2-3 versions of Chromium ago timezone was correct.

Chrome version: 63.0.3239.108  Channel: stable
OS Version: OS X 10.13.2
Flash Version: 

My timezone does NOT observe daylight savings although daylight savings are in force in other parts of the country.  Visiting http://www.speedtest.net the 'Results' screen shows that the test occurred in UTC rather than WST.
 
var rightNow = new Date();
console.log(rightNow);

returns:

Fri Dec 22 2017 08:37:11 GMT+0000 (UTC) [ Chromium ]

Fri Dec 22 2017 16:38:17 GMT+0800 (AWST)[ Safari ]

Comment 2 by lgrey@chromium.org, Dec 22 2017

Components: Blink>JavaScript
Labels: Needs-Bisect Needs-Triage-M63
Unable to reproduce the issue on reported chrome version 630.03239.108 and latest Chrome version 65.0.3304.0 using Mac 10.13.1 with steps mentioned below

Steps followed for reproducing the issue:
1) Initially set the time zone to Australian Western Standard Time & Closest City: Port Hedland - Australia
2) Launched chrome reported version
3) Opened Dev tools -> Console and run the command :
var rightNow = new Date();
console.log(rightNow);
4) System returns time zone as Wed Dec 27 2017 14:31:40 GMT+0800 (AWST)

@Reporter:
Please find the attached screen cast for your reference and let us know if we missed anything in reproducing the issue, try to test this issue by creating new person with no apps and extensions in it and let us know if the issue still persists, if the issue still persists let us know which time zone and city you are selected in time Zone sections of Date & Time preferences.

Thanks!
797216.mp4
8.0 MB View Download
Cc: viswatej...@techmahindra.com sc00335...@techmahindra.com
Labels: Needs-Feedback Triaged-ET
Hi, I have taken further steps to reproduce issue.

OS X *10.13.2*

Darwin marvin.fritz.box 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9
18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

sudo systemsetup -gettimezone

Password:

Time Zone: Australia/Perth



Removed Chromium ( application )
Installed Chromium Version 62.0.3202.94 (Developer Build) (64-bit)

var rightNow = new Date();
console.log(rightNow);

Reports ==> Thu Dec 28 2017 15:15:33 GMT+0800 (AWST)

Removed Chromium ( application )

Installed Version 63.0.3239.108 (Developer Build) (64-bit)

var rightNow = new Date();
console.log(rightNow);

Reports ==> Thu Dec 28 2017 07:29:44 GMT+0000 (UTC)

Removed Chromium ( application )

Installed Version 63.0.3239.84 (Developer Build) (64-bit)

var rightNow = new Date();
console.log(rightNow);

Reports => Thu Dec 28 2017 07:32:15 GMT+0000 (UTC)

Removed Chromium ( application )

Installed Version 62.0.3202.94 (Developer Build) (64-bit) *

var rightNow = new Date();
console.log(rightNow);

Reports => Thu Dec 28 2017 15:34:14 GMT+0800 (AWST)

Regards,
Walter
Project Member

Comment 7 by sheriffbot@chromium.org, Dec 28 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Bisect Needs-Feedback
Able to reproduce this issue on 63.0.3220.0 but unable to reproduce this issue on latest stable 63.0.3239.108 using Mac 10.13.1 with steps mentioned in comment#0 and comment#6 and by changing timezone to Perth Aurstralia

@Reporter: Please check the issue on latest stable 63.0.3239.108 by restarting chrome and by checking in new person.

Removing Needs-Bisect label as this is not reproducble from chrome TE End.
797216.mp4
1.2 MB View Download
797216 screenshot.png
119 KB View Download
Hi,

I removed my existing version of Chromium and installed 63.0.3239.108

I created a new 'Person'

Chromium	63.0.3239.108 (Developer Build) (64-bit)
Revision	7745b8c9fb296dee36e4ae62d712bc8a8918a5fb-
OS	Mac OS X
JavaScript	V8 6.3.292.48
Flash	28.0.0.126 /Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36
Command Line	/Applications/Chromium.app/Contents/MacOS/Chromium -psn_0_479349 --flag-switches-begin --flag-switches-end
Executable Path	/Applications/Chromium.app/Contents/MacOS/Chromium
Profile Path	/Users/walter/Library/Application Support/Chromium/Profile 1


The detected timezone is still reported as:

Sat Dec 30 2017 01:37:42 GMT+0000 (UTC)

W.
Project Member

Comment 10 by sheriffbot@chromium.org, Dec 30 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink>JavaScript Blink>JavaScript>Internationalization
Status: Available (was: Unconfirmed)
Hi,

In Version 64.0.3282.119 (Developer Build) (64-bit) the issue appears to be resolved.

W.

Comment 13 Deleted

I am able to reproduce this. Chrome returns the date in UTC after the computer goes to sleep mode and awakes (while Chrome is open). If I restart Chrome, it works well again (getTimezoneOffset() will return the right amount of time instead of 0). Tested in Chrome 71, Windows 7.
Comment 14 may have stumbled onto a new issue with Chrome 71 reported in  Issue 896759  back in October 2018
Note:  Issue 896759  was merged into a fixed Win7-only issue, so I opened a new Issue 919274 with full repro steps, and has similarity to this bug (reverting to UTC), but is Windows 10 instead of the MacOS of this report.  I believe Comment 14 resembles my symptoms exactly.

Sign in to add a comment