Issue metadata
Sign in to add a comment
|
getTimezoneOffset return incorrect value in GMT+0805 timezone.
Reported by
brander....@gmail.com,
Jun 12 2018
|
||||||||||||||||||||||
Issue descriptionUserAgent: 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.
,
Jun 12 2018
,
Jun 12 2018
,
Jun 12 2018
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.
,
Jun 13 2018
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.
,
Jun 16 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by brander....@gmail.com
, Jun 12 2018