Chrome和Firefox分析日期的方式不同

时间:2015-07-13 13:16:39

标签: javascript momentjs

我发现chrome解析某些日期模式的方式不同,时间字符串"2015-07-13T07:30:00"来自moment(time).format()

铬:

new Date("2015-07-13T07:30:00").toISOString()
// output "2015-07-13T07:30:00.000Z"

火狐:

new Date("2015-07-13T07:30:00").toISOString()
// output "2015-07-12T23:30:00.000Z"

Firefox的输出是我想要的输出,Chrome自动假设时区是utf偏移0,我该如何解决这个问题?

0 个答案:

没有答案