JavaScript 日期显示错误时区 "GMT+0521 (India Standard Time)"

标签 javascript date

我有一个简单的问题。

Why JavaScript show's wrong TimeZone if the date is after the year 1906

Please find the below screenshot for the same.

<小时/>

Chrome Console

最佳答案

来自维基:https://en.wikipedia.org/wiki/Time_in_India

Though British India did not officially adopt the standard time zones until 1905, when the meridian passing east of Allahabad at 82.5° E longitude was picked as the central meridian for India, corresponding to a single time zone for the country (UTC+5:30). Indian Standard Time came into force on 1 January 1906, and also applied to Sri Lanka (then Ceylon). However, Calcutta time was officially maintained as a separate time zone until 1948 and Bombay time until 1955.[8]

Some older time zones were:

Bombay Time (UTC+04:51), Madras Time (UTC+05:21) Calcutta Time (UTC+05:54), Port Blair mean time

关于JavaScript 日期显示错误时区 "GMT+0521 (India Standard Time)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51020995/

相关文章:

javascript - 检查时隙之间的时间

java - 如何从 "Date"读取 "Excel"值并使用 "Date picker"将该值发送到 "Selenium WebDriver"

javascript - 滚动到名称为 "foo"的随机类

javascript - 验证两个数字之间的文本字段长度

javascript - 使用 JavaScript 以编程方式编辑 Google 文档

javascript - 如何使用 JS/jQuery 制作插件/库

javascript - 在 Drupal 7 中使用 JQuery

php - 如何每周获取数据。只到星期一至下星期日

r - 在 R 中查找特定月份的第一天

javascript - Date.getTime() 为相同的时间戳给出两个不同的值