• Resolved raskull

    (@raskull)


    The date/time url parameters created by #_EVENTGCALURL are incorrect if the event is after daylight saving time ends (3 Nov 2013).

    In classes > em-event.php the parameter is created with gmt_offset:
    $dateStart = date('Ymd\THis\Z',$this->start - (60*60*get_option('gmt_offset')));

    Examine, for example, the date/time parameters created by
    <a href="<?php echo $EM_Event->output('#_EVENTGCALURL'); ?>">add to google calendar</a>
    on an event after 3 Nov.

    Please advise.

    http://ww.wp.xz.cn/plugins/events-manager/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry, this works for me; can you try to change timezone at WP Settings > General > Timezone > try to use manual offset instead of city specific? or try to disable other plugins to rule-out any plugin issue.

    Thread Starter raskull

    (@raskull)

    Sorry, this simply isn’t working after millions of tests. Did you follow the generated URL, of an event existing in a different dst/standard period, to google calendar? What time appears in google calendar for you? Let’s both list exact steps and settings. Sure, I can set a manual offset today to -5 while DST is in effect. But then I have to get up one day and change it to DST -6 when it isn’t.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    yes, maybe you can share sample link for us to see and what should be the expected result?

    thanks

    Thread Starter raskull

    (@raskull)

    Okay. Go to your own demo at http://demo.wp-events-plugin.com/

    Go to this event which is during daylight savings time and click the “Remind me with google calendar” button:
    George Clinton
    29/09/2013
    19:00 -20:45

    Go to this event which is during standard time and click the “Remind me with google calendar” button:
    Entradas para El Lago de los Cisnes
    15/11/2013
    19:00 -20:45

    Although both events are at 19:00 they enter google calendar with times one hour apart.

    I’m not seeing this either. I’m wondering it it’s an issue with the timezone settings in your Google Calendar?

    Are you still on Daylight saving / summer time where you are? That could be the issue – either GCal or EM not compensating for the hour difference.

    Here in Europe we’re no longer on Summer time, which might be why we’re not seeing the same problem.

    Thread Starter raskull

    (@raskull)

    Can you pick two events — one in your current time and another in your Summer time — and see what happens? I have tried various google calendar accounts at various time zone settings and always see this problem.

    I set this up on my test machine and I’m getting something similar – the date that comes after next years time change has one hour added to it in Google calendar.

    I’m still not sure if this is a GCal or EM issue, but I’ll let Marcus know about this thread.

    Thread Starter raskull

    (@raskull)

    Here’s what I can tell you… If you remove the Z and the gmt offset, the event will go into google calendar at the time the event says, without trying to translate for time zone or daylight saving. If the event is at 7:00 pm in your country, it will still say 7:00 pm in my country, and it will stay at 7:00 pm no matter what time of year it is. I have no problem with that behavior; at least it’s predictable. Also, the gcal user can specify their time zone when adding the event to their calendar and that will translate the time.
    $dateStart = date('Ymd\THis',$this->start);
    The other thing I am trying to test is leaving the code as you have it, but adding a condition for detecting daylight savings or standard time and the switchover date through WP’s settings. When you select a time zone in WP admin, you get a message like this: “This timezone is currently in daylight saving time. This timezone switches to daylight savings time on : x.”  

    Based on detecting those strings and/or values, you would add or subtract an hour from gmt offset. See wp-admin > options-general.php

    Plugin Support angelo_nwl

    (@angelo_nwl)

    will let Marcus know about this.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    You’re right. I see it on the demo too.

    Will fix asap. We already do this for the ical feeds so we’ll add the same concept there.

    Raskull,
    on a different thread you solved the google calendar problem not showing the street address.
    http://ww.wp.xz.cn/support/topic/plugin-events-manager-ics-for-google-calendar-and-ical-do-not-contain-location-address

    I wanted to implement your solution but can’t figure out which file to modify. Can you let me know?

    Sorry to intrude on this thread, but I didn’t know how else to ask you since that thread is closed.

    Thread Starter raskull

    (@raskull)

    Add the code snippet at the end of that thread to your theme’s functions.php file.

    That code modifies EM’s #_LOCATION placeholder by adding the location address to the location name.

    Then the $gcal_url string is built with your modified #_LOCATION — which now includes the address — and is passed as a URL parameter to google calendar.

    Thank you so much raskull, that worked like a charm.

    I also found something which might interest you:
    http://addthisevent.com/

    That’s probably what I would have implemented if you hadn’t found this solution. Looks like a really interesting website. I might use it somewhere else.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘#_EVENTGCALURL daylight saving time problem’ is closed to new replies.