Complete calendar and time zones

I use Fullcalendar 1.5.3 and JQuery 1.7.2 - in my local time zone the data is displayed fine, but in other time zones it works intermittently, I assume due to the time difference relative to the local time in the time zone.

I take the JSON channel from the file, and the dates are stored in MySQL as Ymd.

I read in ignoreTimezone and set it to false and true both in fullcalendar.js and in the page call for the calendar object, but that does not make any difference. The documentation for ignoreTimezone mentions working with an ISO8601 date, which is not mine.

In the specific example below, a client on the US West Coast sees Christmas Day showing December 24th - I have confirmation from the client that they used several browsers and machines, and I had this problem with more than one client so it seems that it is not localized on one client machine, etc.

Here is the code:

<script> $(document).ready(function() { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, ignoreTimezone: false, titleFormat: { month: 'MMMM yyyy', week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}", day: 'dddd, MMM d, yyyy' }, columnFormat: { month: 'ddd', week: 'ddd d/M', day: 'dddd d/M' }, timeFormat: { // for event elements '': 'H(:mm)t' // default }, eventSources: [ 'public_holidays_feed.php' ] }) }); </script> 

A snapshot of my JSON feed shows:

 [ {"id":"1","title":"New Year Day (USA)","start":"2012-01-02","end":"2012-01-02","backgroundColor":"#000000","allDay":true}, {"id":"2","title":"New Year Day (UK)","start":"2012-01-02","end":"2012-01-02","backgroundColor":"#000000","allDay":true}, {"id":"3","title":"Birthday of Martin Luther King, Jr. (USA)","start":"2012-01-16","end":"2012-01-16","backgroundColor":"#000000","allDay":true}, {"id":"4","title":"Washington Birthday (USA)","start":"2012-02-20","end":"2012-02-20","backgroundColor":"#000000","allDay":true}, {"id":"5","title":"Good Friday (UK)","start":"2012-04-06","end":"2012-04-06","backgroundColor":"#000000","allDay":true} ] 

How can I make the above ignore the local time zone and use only the server time zone, so if the date in MySQL says 2012-12-25, then this is what everyone should see no matter where they are?

thanks

+4
source share
1 answer

Hello, I had a big problem with these problems, make sure you use json feed:

t

 [{"id":"190","allDay":false,"editable":true,"title":"Sam Shift","start":"2013-07-14 18:00:00","end":"2013-07-15 02:00:00"}] 

I know that the "allDay" docs use false by default, but if it's not a full day, check it, and of course, mark the start and end times.

If your event is complete, make sure you tag it.

Hope this works.

**, of course, indicate the date and time as you want, there is no connection with the time zone, each client will see this event in the date line that you sent.

0
source

All Articles