最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Change timezone in Arshaw FullCalendar - Stack Overflow

programmeradmin1浏览0评论

From my understanding, Arshaw FullCalendar displays events according to the timezone of the local puter's operating system. I assume this is done by the javascript Date() object, which also is based on the local puter's operating system. I have an application that has group calendars and a group timezone, I want to be able to force every local Arshaw Calendar to display according to that group's time-zone, no matter what timezone that puter is. How do you do this?

Note: I've looked through the documentation fairly thoroughly, and found no such option. I'm hoping that javascript has something equivalent to php's date_default_timezone_set(), which seems to me the way this could be solved.

*Edit 1/31/2013 12:23pm CST: I am sending everything to the calendar as unix timestamps, so I assume the option ignoreTimezone would not apply here, as described in this stackoverflow thread: jQuery FullCalendar timezone synchronization

From my understanding, Arshaw FullCalendar displays events according to the timezone of the local puter's operating system. I assume this is done by the javascript Date() object, which also is based on the local puter's operating system. I have an application that has group calendars and a group timezone, I want to be able to force every local Arshaw Calendar to display according to that group's time-zone, no matter what timezone that puter is. How do you do this?

Note: I've looked through the documentation fairly thoroughly, and found no such option. I'm hoping that javascript has something equivalent to php's date_default_timezone_set(), which seems to me the way this could be solved.

*Edit 1/31/2013 12:23pm CST: I am sending everything to the calendar as unix timestamps, so I assume the option ignoreTimezone would not apply here, as described in this stackoverflow thread: jQuery FullCalendar timezone synchronization

Share Improve this question edited May 23, 2017 at 11:49 CommunityBot 11 silver badge asked Jan 31, 2013 at 18:20 Colin BroganColin Brogan 7481 gold badge10 silver badges27 bronze badges 3
  • did you asked the question ? – zb' Commented Jan 31, 2013 at 18:32
  • I have the same problem, but setting the timezone alone may not do the trick, as there are varying daylight-saving periods (ex: Mex has different dates)... so, anyone has an elegant solution for forcing the client to use a given time, regardless of the local time in the client's system (which may also be wrong)??? – MaxD Commented Jan 31, 2013 at 22:58
  • 1 stackoverflow./questions/2771609/… – Dom Commented Feb 4, 2013 at 21:24
Add a ment  | 

1 Answer 1

Reset to default 5

You should probably try to set the option "ignoreTimezone" to "false" and give to Arshaw FullCalendar date in ISO8601.

You can get more information about that here: http://arshaw./fullcalendar/docs/event_data/ignoreTimezone/

To convert unix timestamps to ISO8601, you can use this in javascript:

var d = new Date(1360412434000).toISOString();

This is ECMAScript 5. See here for patibility and fallback code: https://developer.mozilla/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString

发布评论

评论列表(0)

  1. 暂无评论