使用javascript Date(),与Safari相比,Firefox中的时区不正确 [英] Incorrect timezone in Firefox, compared to Safari, using javascript Date()
本文介绍了使用javascript Date(),与Safari相比,Firefox中的时区不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下代码
var date = new Date();
console.log( date );
给我
Sun Mar 06 2011 21:41:36 GMT+1300 (NZST) {}
在Firefox中,但
in Firefox, but
Sun Mar 06 2011 21:40:51 GMT+1300 (NZDT)
(这是正确的)。
我的系统日期和放大器;时间设置为NZDT,所以我想知道firefox从哪里获得NZST。请注意,UTC偏移量(+1300)在两种情况下都是正确的。
My system Date & Time is set to NZDT, so I'm wondering where firefox is getting its NZST from. Mind you, the UTC offset (+1300) is correct in both cases.
如何让Firefox显示正确的时区:NZDT?
How can I get Firefox displaying the correct timezone: NZDT?
推荐答案
这是Firefox v4及更高版本中修复的错误。
This was a bug that was fixed in Firefox v4 and later.
这篇关于使用javascript Date(),与Safari相比,Firefox中的时区不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文