| Issue 953: | different behavior for unix and ISO dates, and ignoreTimezone doesn't seem to care. | |
| 1 person starred this issue and may be notified of changes. | Back to list |
It seems there is an issue with the way fullcalendar is rendering the events and the timezone. I know there's a lot of topics/issues on that but I've got a case that I didn't see around. In my db the dates are stored as unix timestamps. I have for example: "start": "1315220400" which is Mon, 05 Sep 2011 11:00:00 GMT. It shows up correctly as 7pm on fullcalendar following my timezone (GMT+8), so no issue with that. When I move my events around I update my db by getting all the events with the clientEvents method. The clientEvents returns an array that I JSON.stringify. My previous unix timestamp becomes "start":"2011-09-05T11:00:00.000Z" which I believe is ok, as I'll store only UTC times in the db. The thing is that the next time I reload fullcalendar, my event shows up at 11am, instead of 7pm. So if I use a unix timestamp it shows correctly by adding 8 hours, with the ISO format it doesn't. Enabling/disabling ignoreTimezone doesn't change anything (which I believe is ok in that case). The second thing is that if I add an offset to the ISO date, like for example 2011-09-05T11:00:00.000+1:00Z, the event will be rendered at 7pm. I can add whatever offset, it will be rendered at 7pm, always. I can enable/disable ignoreTimezone, it doesn't change (which it should, in that case). Is it clear enough? Let me know if you need more info. It's gonna be hard to make a package because I'm using Symfony. If needed I can try to reproduce the error within a smaller setup.
May 17, 2011
#1
guill.b...@gmail.com
May 18, 2011
There was an issue with the 'Z' timezone indicator not being recognized. I just checked this and cannot find any special handling for 'Z'. https://github.com/arshaw/fullcalendar/blob/master/src/date_util.js -> parseISO8601() should check for m[14] == 'Z'. I had a fix for this in an older issue. Seems that Adam missed to implement it.
Status:
Accepted
Labels: Type-Defect
May 18, 2011
(No comment was entered for this change.)
Status:
Duplicate
Mergedinto: 750
May 18, 2011
I see. I read the issue 750 before but it didn't look at that time like my issue. Now that I've checked deeper, it does make sense yeah. Thanks for the comment.
May 18, 2011
Adding, just for info: if you already corrected this before you can fork the source on github, update it, and ask adam to merge it. I did that once for some css issues. |
|
| ► Sign in to add a comment |