FullCalendar:默认时区,与客户的位置无关
FullCalendar: Default timezone irrespective of client's location
我正在尝试使用 fullcalendar
创建约会安排应用程序。我想在所有位置仅在一个时区(即 EST)中表示日历上的时隙。因此,即使来自 PST 区域的人正在查看日历,时间也应该是 EST。另外,即使 he/she 安排了点击一个时段,时间也应该在美国东部时间。无论位置如何,如何为日历设置默认时区。
我相信这可以通过在初始化日历时指定时区字符串来完成:
$('#calendar-selector-id-name').fullCalendar({
timezone: 'American/Indiana/Indianapolis'
});
你提到了 gcal.js
等等,我想知道是否需要这样定义:
$('#calendar-selector-id-name').fullCalendar({
timezone: 'American/Indiana/Indianapolis',
eventSources:[{
url: 'https://www.google.com/calendar/feeds/...',
currentTimezone: 'American/Indiana/Indianapolis'
}]
});
Timezone problems when using Google Calendar #1801
编辑
@jaykumarark 做了一些进一步的研究并挖掘出以下内容:
Google Calendar - htmlLink not always defined #2844
这表明对于 GoogleApps 日历,未为仅共享 free/busy 信息并隐藏事件详细信息的事件提供初始化的 htmlLink
变量。
Jay 还注意到发现了以下 work-around:
"commenting line 144 in gcal.js //url=injectQsComponent(url, 'ctz=' + timezoneArg);
I could represent times in a particular timezone irrespective of location."
所以,总结一下:
- 目前,与位置无关的设置时区似乎可行
GoogleApps 日历很好,只要 3 个“共享所有
信息,...”已选择共享设置。
- Adam Shaw 已确认问题
htmlLink
需要进行存在性检查,即在某些时候
javascript 错误将得到解决。
- Jay 为那些希望实施的人提供了 work-around
一个同义的解决方案。
请参阅下面的评论以获取更多信息 information/clarifications。
我正在尝试使用 fullcalendar
创建约会安排应用程序。我想在所有位置仅在一个时区(即 EST)中表示日历上的时隙。因此,即使来自 PST 区域的人正在查看日历,时间也应该是 EST。另外,即使 he/she 安排了点击一个时段,时间也应该在美国东部时间。无论位置如何,如何为日历设置默认时区。
我相信这可以通过在初始化日历时指定时区字符串来完成:
$('#calendar-selector-id-name').fullCalendar({
timezone: 'American/Indiana/Indianapolis'
});
你提到了 gcal.js
等等,我想知道是否需要这样定义:
$('#calendar-selector-id-name').fullCalendar({
timezone: 'American/Indiana/Indianapolis',
eventSources:[{
url: 'https://www.google.com/calendar/feeds/...',
currentTimezone: 'American/Indiana/Indianapolis'
}]
});
Timezone problems when using Google Calendar #1801
编辑
@jaykumarark 做了一些进一步的研究并挖掘出以下内容:
Google Calendar - htmlLink not always defined #2844
这表明对于 GoogleApps 日历,未为仅共享 free/busy 信息并隐藏事件详细信息的事件提供初始化的 htmlLink
变量。
Jay 还注意到发现了以下 work-around:
"commenting line 144 in gcal.js //url=injectQsComponent(url, 'ctz=' + timezoneArg);
I could represent times in a particular timezone irrespective of location."
所以,总结一下:
- 目前,与位置无关的设置时区似乎可行 GoogleApps 日历很好,只要 3 个“共享所有 信息,...”已选择共享设置。
- Adam Shaw 已确认问题
htmlLink
需要进行存在性检查,即在某些时候 javascript 错误将得到解决。 - Jay 为那些希望实施的人提供了 work-around 一个同义的解决方案。
请参阅下面的评论以获取更多信息 information/clarifications。