New issue
Advanced search Search tips

Issue 851804 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

getTimezoneOffset return incorrect value in GMT+0805 timezone.

Reported by brander....@gmail.com, Jun 12 2018

Issue description

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

Steps to reproduce the problem:
1. var date = new Date(-25569*86400000) //in Chinese locale time zone.
2. console.log(date.getTimezoneOffset());
3. console.log(date.toLocaleString());

Result: 
-485
"Sat Dec 30 1899 08:05:43 GMT+0805 (China Standard Time)"

What is the expected behavior?
the getTimezoneOffset should return -485-43/60 = -485.283333
Or
the date should be:
Sat Dec 30 1899 08:05:00 GMT+0805 (China Standard Time)

What went wrong?
If the time zone offset is 08:05:43, why the getTimezoneOffset return only -485?

The return value should be -485-43/60 = -485.283333.

If current getTimezoneOffset is correct that means another bug,
the Date should be 
Sat Dec 30 1899 08:05:00 GMT+0805 (China Standard Time).

43 seconds is needless.

Please help to check.

Did this work before? Yes Chrome v66

Chrome version: 67.0.3396.79  Channel: stable
OS Version: OS X 10.13.5
Flash Version: 

Please check it carefully, it relates to our OADate calculate system.
 
Sorry, update the reproduce steps:

var date = new Date(-25569*86400000) //in Chinese locale time zone.
console.log(date.getTimezoneOffset());
console.log(date.toString());

Comment 2 by tkent@chromium.org, Jun 12 2018

Components: -Blink Blink>JavaScript
Labels: Needs-Bisect Needs-Triage-M67

Comment 4 by js...@chromium.org, Jun 12 2018

Status: WontFix (was: Unconfirmed)
IN 1889, the timezone offset was different from today. 0805 is the correct offset for Asia/Shanghai or Asia/Beijing in 1889. It used Local Mean Time. 

Thanks for your explanation, I know 0805 is correct, but shouldn't it be 0805+43s?

The date contains 080543 for h:mm:ss, but the timezone offset is only 0805, it is hard to know where to get the 43s.

Comment 6 by js...@chromium.org, Jun 16 2018

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

Sign in to add a comment