Support

Home Forums Event Espresso Premium iCal link timezone

iCal link timezone

Posted: February 3, 2016 at 9:37 am


Jason

February 3, 2016 at 9:37 am

Hi,
I started using the new [ICAL_LINK_*] shortcode and it is working fine except for events that happen after the daylight savings time switch in March they have the wrong offset when added to a calendar. I have two events that are both set to 6:30pm on the event page but the one in March gets added to the calendar as 7:30.
I am set to timezone of “New York” in WordPress settings.


$ curl -s "https://cbuswaw.com/?ee=download_ics_file&ics_id=5" | grep START
DTSTART:20160217T233000Z
$ curl -s "https://cbuswaw.com/?ee=download_ics_file&ics_id=6" | grep START
DTSTART:20160316T233000Z

Thanks,
Jason


Josh

  • Support Staff

February 3, 2016 at 6:38 pm

Hi Jason,

That’s really interesting, and what’s also interesting is I checked our testing server and got different results where the event times have the offset. Here’s the results I got when comparing this event and this other event:

$ curl -s "http://ee4m.eventespresso.com?ee=download_ics_file&ics_id=327" | grep START
DTSTART:20160217T233000Z
$ curl -s "http://ee4m.eventespresso.com?ee=download_ics_file&ics_id=328" | grep START
DTSTART:20160316T223000Z

Do you happen to know or can you check to see if there are any active plugins on your site that use date_default_timezone_set()?


Jason

February 4, 2016 at 7:50 am

Hi Josh,
It’s working for me now, though I’m not sure why. I did have several plugins with date_default_timezone_set(), and after deactivated & reactivating those I noticed the March event in the admin was now showing 7:30pm instead of 6:30pm. I’m not sure if it was because of the plugin deactivation & reactiviation (plugins were google-analytics-for-wordpress w3-total-cache wordpress-seo backupbuddy) or if there was maybe a caching issue?

Before contacting you the first time I had original had UTC-5 set as the timezone (not New York), and I had changed it to New York but that hadn’t fixed the issue. Maybe w3tc or something else was caching the UTC-5 offset?

In any case, it seems fine now, thank you!


Josh

  • Support Staff

February 4, 2016 at 8:03 am

You might find that you’ll need to remove any instances of date_default_timezone_set() from your site. There’s a good explanation why in this developer documentation article from vip.wordpress.com:

https://vip.wordpress.com/documentation/vip-development-tips-tricks/use-current_time-not-date_default_timezone_set/

The support post ‘iCal link timezone’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 3 years, 10 months ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!