开发者

Is FullCalendar parsing timezones incorrectly?

开发者 https://www.devze.com 2023-02-27 03:27 出处:网络
From firebug: >>> jQuery.fullCalendar.parseISO8601(\"2011-04-18T17:00:00Z\").getUTCHours() 22 Shouldn\'t the result be 17?

From firebug:

>>> jQuery.fullCalendar.parseISO8601("2011-04-18T17:00:00Z").getUTCHours()
22

Shouldn't the result be 17?

parseISO8601 returns this da开发者_高级运维te object:

>>> jQuery.fullCalendar.parseISO8601("2011-04-18T17:00:00Z")
Date {Mon Apr 18 2011 17:00:00 GMT-0500 (CDT)}

I think the date object should be "12:00:00 GMT-0500" to be the same time. Am I misunderstanding it?

From FF 4's Date object:

>>> new Date("2011-04-18T17:00:00Z")
Date {Mon Apr 18 2011 12:00:00 GMT-0500 (CDT)}
>>> new Date("2011-04-18T17:00:00Z").getUTCHours()
17


you are experiencing this issue: http://code.google.com/p/fullcalendar/issues/detail?id=750

will get it fixed soon

0

精彩评论

暂无评论...
验证码 换一张
取 消