[Resolved] [Plugin: Events Manager] Daylight Saving Time problem
I wonder if anyone can help. When I enter events after the clocks go back in December in to event manager. The times display incorrectly in Google Calendar when using the ical feed.
Compare the following:
http://www.ians-studio.co.uk/calendar/ Look at the two events on Friday 28th October and 4th November both at 19:00.
If you import the calendar feed: http://www.ians-studio.co.uk/events.ics in to google calendar you will see the time for the 4th November event is shown at 18:00.
The clocks go back in the UK on 30th October. All events after that time in Google calendar via the ics feed are out by one hour.
Can anyone advice on how to fix this?
are you using the latest version 4.212? also can you try this post http://wordpress.org/support/topic/plugin-events-manager-ics-and-time-zones?replies=15
Latest version is installed. The more I look at this though the more I think it is to do with the fact that wordpress as a whole has no concept of daylight saving time. So at the moment the timezone is for WP is set to UTC+1 because I’m in daylight saving time. Google calendar does know about daylight saving and automagically changes the time when it reads the ICS file.
This is becoming a BIG BIG issue for me – because I need to make my google calendar available to clients so that they can seen when they can book the studio but all events after the clock go back are are shown with the wrong times.
Anyone got any suggestions??
just checked, works fine for me.
actually, it might be a PHP/server issue, as WP takes its info from there, so if your server isn’t taking DST into account it might give bad date results.
This is still a big issue for me. Once daylight saving changed at the end of October all the events in google calendar shifted to the correct time. I’m now starting to see the problem again as I start to enter events after the spring time change.
Can you elaborate more on your comment about it being a PHP/Server issue and give me some indication as to how I might solve this.
Ultimately I want to move to the paid version of event manager for some of the additional functionality it gives but I really need to get this resolved before I can do that.
Any help you can offer would be appreciated.
Servers calculate their PHP time based on the server clock, and some php settings in your php.ini file. Depending on your settings there, it may be that your server times are not right, hence EM getting the wrong date values.
If you contacted your hosts (or try it on another host) hopefully this should resolve itself once you fix your server time.
Sorry to be a pain but I am confused. The time in EM *IS* correct on my server – I don’t have any problems on the server… the problem appears to be with how the .ics file is interpreted by Google Calendar.
This is an entry in the ics file after daylight savings change:
BEGIN:VEVENT UID:e79b311e-6407-401e-b390-f68fcebfa0e9 DTSTART:20120406T190000Z DTEND:20120406T220000Z DTSTAMP:20111206T125646Z SUMMARY:Good Friday - NO Friday Night at the Studio Event - Ian's Studio - 6 Apr 12 19:00 LOCATION:#_LOCATION URL:http://www.ians-studio.co.uk/events/event/good-friday-no-friday-night-at-the-studio-event/ END:VEVENT
As you can see it is being exported as being 19:00 till 22:00. But when Google calendar imports the event it imports as running 20:00 till 23:00.
Looking at the header of the ics file I have the following:
BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH CALSCALE:GREGORIAN PRODID:-//Events Manager//1.0//EN X-WR-CALNAME:Ian's Studio - Calendar
I won’t pretend to really understand the ics file format but I would expect to see a TZID tag daylight savings specification to say what timezone the calendar is for and when daylight savings starts.
When the ics is imported into Google calendar a calendar timezone of “GMT+00:00) GMT (no daylight saving)” is set with no way to change this.
Some ics files I’ve looked at have the following included in in the header seciton:
BEGIN:VTIMEZONE TZID:Europe/London BEGIN:DAYLIGHT TZOFFSETFROM:+0000 TZOFFSETTO:+0100 DTSTART:19810329T010000 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU TZNAME:BST END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:+0100 TZOFFSETTO:+0000 DTSTART:19961027T020000 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU TZNAME:GMT END:STANDARD END:VTIMEZONE
Nothing like this appears in the ics file generated by EM.
Ok, I’ve been doing some research and I think I can see where the problem is:
I’ve created two ICS files. This first one is as generated by EM:
BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH CALSCALE:GREGORIAN PRODID:-//Events Manager//1.0//EN X-WR-CALNAME:IMB Test Calendar BEGIN:VEVENT UID:949d32c0-9e00-4e86-a8f4-b0ee95399ae3 DTSTART:20120311T190000Z DTEND:20120311T220000Z DTSTAMP:20111108T091634Z SUMMARY:Introduction to Wedding Photography Workshop - Ian's Studio - 11 Mar 12 19:00 LOCATION:#_LOCATION URL:http://www.ians-studio.co.uk/events/event/introduction-to-wedding-photography-workshop-2/ END:VEVENT BEGIN:VEVENT UID:e79b311e-6407-401e-b390-f68fcebfa0e3 DTSTART:20120406T190000Z DTEND:20120406T220000Z DTSTAMP:20111206T125646Z SUMMARY:Good Friday - NO Friday Night at the Studio Event - Ian's Studio - 6 Apr 12 19:00 LOCATION:#_LOCATION URL:http://www.ians-studio.co.uk/events/event/good-friday-no-friday-night-at-the-studio-event/ END:VEVENT END:VCALENDAR
When this is imported in to Google Calendar the first entry appears at 19:00 the second event at 20:00
This is the second ics file:
BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH CALSCALE:GREGORIAN PRODID:-//Events Manager//1.0//EN X-WR-CALNAME:IMB Test Calendar BEGIN:VEVENT UID:949d32c0-9e00-4e86-a8f4-b0ee95399ae2 DTSTART:20120311T190000 DTEND:20120311T220000 DTSTAMP:20111108T091634 SUMMARY:Introduction to Wedding Photography Workshop - Ian's Studio - 11 Mar 12 19:00 LOCATION:#_LOCATION URL:http://www.ians-studio.co.uk/events/event/introduction-to-wedding-photography-workshop-2/ END:VEVENT BEGIN:VEVENT UID:e79b311e-6407-401e-b390-f68fcebfa0e2 DTSTART:20120406T190000 DTEND:20120406T220000 DTSTAMP:20111206T125646 SUMMARY:Good Friday - NO Friday Night at the Studio Event - Ian's Studio - 6 Apr 12 19:00 LOCATION:#_LOCATION URL:http://www.ians-studio.co.uk/events/event/good-friday-no-friday-night-at-the-studio-event/ END:VEVENT END:VCALENDAR
When this one is imported BOTH events start correctly at 19:00.
The only difference between the two files that the second one does NOT have the “Z” suffix on the times. It appears that the “Z” suffix forces google calendar to take the time as UTC/GMT and not as ‘local’ or ‘daylight correct’ time.
I don’t know what causes the “Z” suffix to be added. Is it a server setting, a wordpress setting or an EM setting.
In addition to all this looking at the ics file generated by EM the LOCATION is being set to “#_LOCATION” and not to the location specified in EM.
Any suggestions for resolving this would be welcomed.
hey, I’m working with a slightly older version but I do see Z appear in my EM’s /templates/ical.php
$dateStart = date('Ymd\THis\Z',$EM_Event->start - (60*60*get_option('gmt_offset'))); $dateEnd = date('Ymd\THis\Z',$EM_Event->end - (60*60*get_option('gmt_offset'))); $dateModified = date('Ymd\THis\Z', $EM_Event->modified);
Z has to be there. It is UTC time which is calculated according to your blog settings.
Viewing the two dates side by side fromt he first ical:
My guess is you have a DST issue here, hence the hour being off on the second one. I’d say the second ical is wrong, and google is calculating it an hour off (which may seem correct but it’s not).
That said, I’m looking into another user with a similar time display problem, If I find an issue related to EM will fix (or might have more solutions as to why it’s happening)
I’m discovering this same issue with my blog right now with the upcoming DST change. I have the latest events plugin, and the latest wordpress, and my host is dreamhost.
Marcus, did you encounter any solution while working on your other problem?
these days I’m not coming across any timezone problems like this anymore (at least not for now… :/) does your timezone settings take DST into account?
I can confirm that this continues to be a major problem for me. As far as I can tell my web host, wordpress and google calendar all take DST in to account.
Other ics files that I load into google calendar all work fine across DST changes. So I don’t believe the problem can be at the google end.
I don’t see anything odd happening with DST anywhere else on the wordpress installation. If there are any specifice WP or server settings that I need to check please tell me and I will check them.
As it happens… I have a massive schedule of events (100+) coming up this weekend (DST!) on a site that will be visited by a lot of people (50,000+) with a button for each event to add to google calendar. I sure hope it still works come Sunday 2:00 am, or I’m in for a major FAIL!
Okay, maybe this is obvious, but the first thing I’m doing in preparation is changing from a UTC setting to a city-in-my-time-zone setting. That seems like it will take care of things on the WordPress front. Checking in with my server next…
- The topic ‘[Resolved] [Plugin: Events Manager] Daylight Saving Time problem’ is closed to new replies.