FullCalendar .start 没有得到正确的时间

FullCalendar .start don't get properly hour

这个问题快把我逼疯了。我不知道该怎么做才能真诚地解决它。我的日历显示此显示:

并通过以下方式初始化:

 $('#calendar').fullCalendar({
        'defaultView': 'multiColAgendaDay',
        'height': BackendCalendar.getCalendarHeight(),
        'editable': true,
        'firstDay': 1,          //Lunedì
        'slotMinutes': 30,
        'snapMinutes': 15,
        'axisFormat': 'H:mm',
        'timeFormat': 'H(:mm)',
        'allDayText': EALang['all_day'], 
        ...

我通过以下方式获取开始日期:

console.log($calendar.fullCalendar('getView').start);

但不是返回这个(就像版本 1.6.1 那样)

Fri Oct 23 2015 00:00:00 GMT+0200 (ora legale Europa occidentale)

返回这个:

Fri Oct 23 2015 02:00:00 GMT+0200 (ora legale Europa occidentale)

这破坏了我的整个代码!! 想法?

我的时区

我在意大利/罗马

完整日历版本

2.3.1

如果你想让它使用你的本地时间,你需要在你的 fullcalendar 选项对象中设置 timezone: local,因为 fullcalendar 不再忽略时区。

如果您希望它使用给定的时区 (Italy/Rome),您可能需要检查 moment-timezone 以及 moment-timezone-data 以使其正常工作(moment.js 是主要依赖项).

请在此处检查时区文档:http://fullcalendar.io/docs/timezone/timezone/

希望对您有所帮助。

编辑:由于您要从 1.x 移动到 2.x,也许您想检查一下 "changelog":http://fullcalendar.io/wiki/Upgrading-to-v2/