【发布时间】:2014-01-13 06:57:06
【问题描述】:
我正在使用 Arshaw fullcalendar 插件版本 1.5.3,
问题是我在上午 9 点使用本地机器时区 EST(东部时间)创建了一个事件,当我将本地机器时区更改为 IST 时,该事件出现在日历中的不同时间晚上 7:30。
它在 EASTERN 时区工作得非常好,如果更改,那么记录会出现在错误的时间。
请帮助我尝试将 ignoreTimezone 初始化为 false 并更新了版本,但似乎没有任何帮助。
// initialize the fullcalendar and set ignore timezone to false
$(document).ready(function() {
$('#calendar').fullCalendar({
events: {
url: 'http://www.google.com/your_feed_url/',
className: 'gcal-event', // an option!
currentTimezone: 'America/Chicago' // an option!
},
ignoreTimezone: false
});
});
/* Passing the event to fullcalendar to display the slots in calendar properly
It accepts the start and end time in timestamp */
event.id = appId;
event.start = startTime; // 1389358800 timestamp
event.end = endTime; // 1389359700 timestamp
event.editable = presentEvent;
event.allDay = false;
event.patient_name = patient_name;
events.push(event);
_ac.fullCalendar('addEventSource',events);
它适用于东部时区,并且广告位在上午 8:00(开始时间)-上午 8:15(结束时间)正确显示
当我将本地时区更改为 IST 时,该时段出现在下午 6:30(开始时间)到下午 6.45(结束时间)
【问题讨论】:
-
请准确地向我们展示您所使用的配置选项的代码。
-
$(document).ready(function() { $('#calendar').fullCalendar({ events: { url: 'google.com/your_feed_url', className: 'gcal-event', / / 一个选项!currentTimezone: 'America/Chicago' // 一个选项!}, ignoreTimezone: false }); });
-
请编辑您的问题。在 cmets 中代码非常难以阅读。无论如何,你需要展示更多。显示足够的代码来重现问题。请参阅how to ask a question。
-
马特约翰逊,我已经发布了代码,请帮我解决这个问题
标签: timezone fullcalendar