Issue metadata
Sign in to add a comment
|
getTimezoneOffset return incorrect value in GMT+0805 timezone.
Reported by
brander....@gmail.com,
Jun 14 2018
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 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()); Output: -485 3. console.log(date.toString()); Sat Dec 30 1899 08:05:43 GMT+0805 (China Standard Time) NOTES: ****I know IN 1889, the timezone offset was different from today. 0805 is the correct offset for Asia/Shanghai or Asia/Beijing in 1889.**** but, if the 0805 is the correct offset, why the return hour part is "08:05:43"? shouldn't it be "08:05:00"? I know in v67, chrome has adjusted the timezone to correct value based on emc262, but how could I get exact timezone offset value with current API? This API is used for my OADate system. PS. I have reported a bug 851804 , but mark to "Won't fix" without a reasonable explanation. What is the expected behavior? Return exact time zone offset value when timezone is 08:05:43. Or provide a way to get the exact offset value. What went wrong? Did this work before? N/A Chrome version: 67.0.3396.87 Channel: stable OS Version: OS X 10.13.5 Flash Version:
,
Jun 14 2018
Filing a new bug for the same (closed) issue isn't helpful. jshin@ could you take a look (again).
,
Jun 16 2018
Why did you file a bug again? > how could I get exact timezone offset value with current API? What do you mean? In year 1899, Beijing time used LMT (local mean time = UTC+0805). So, -485 is the correct timezone offset for year 1899. > mark to "Won't fix" without a reasonable explanation. I did explain why it's UTC+0805 in year 1899.
,
Jun 20 2018
but, if the 0805 is the correct offset, why the return hour part is "08:05:43"? shouldn't it be "08:05:00"?
,
Jun 20 2018
Yes, you already explained the UTC 0805 in the year 1899, I understood and thank you. My question is the 43 seconds. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by krajshree@chromium.org
, Jun 14 2018