I’m currently using the jQuery fullcalendar plugin but I’ve came across an issue regarding daylight savings time in Britain. After the daylight savings take effect the hours are being displayed an hour out of phase.
The problem appears to be with the plugins parsing function. Can someone please provide me with the funciton to parse a UTC string which includes the ‘Z’ demonination into a local date time for display?
After some initial confusion (answers by me and Andy E and mainly my comments to his answer) which you probably missed anyway, I discovered what seems to be the real cause of your problem.
The plugin internally uses the same code of the
parseISO8601function which was proposed by Andy E that comes from Parsing W3C’s ISO 8601 Date/Times in JavaScript.But although Andy E states that that code works without problems, the fullcalendar plugin, which uses that code too, seems to have a bug.
After looking more closely at the code, I noticed that the plugin seems to ignore the timezone you are in.
Compare these code snippets
Snippet from original code from delete.me.uk
Code from fullcalendar.js
As you can see the plugin only handles the timezone if
ignoreTimezoneis set to false. But that simply is never the case.parseISO8601()in this plugin is always called withignoreTimezoneset to true.Thus I bet the bug comes from this and you should consider contacting the author of the plugin. But first you should verify if the date gets parsed correctly if you set
ignoreTimezoneto false in the plugin code