从IE上的Date获取TimeZone字符串

Mud*_*Ali 6 javascript timezone internet-explorer date

谷歌浏览器

new Date()
//returns Fri Mar 29 2013 17:55:25 GMT+0530 (IST)
Run Code Online (Sandbox Code Playgroud)

IE8

new Date()
//returns Fri Mar 29 17:48:46 UTC+0530 2013
Run Code Online (Sandbox Code Playgroud)

我需要(IST)从IE上的Date中提取部分,在Chrome上我可以dateString.substring提取它,但在IE上我不能这样做.

该方法 getTimeZoneOffset 给出了几分钟的偏移量,有没有办法使用偏移量来获取字符串?

或者我是否需要研究与偏移相对应的所有时区字符串并从中创建一个对象然后使用它?

Oph*_*erV 4

这能为您服务吗?

js时区检测

另外,这也可能是相关阅读:How can I certain a timezone by the UTC offset?