All-in-One Event Calendar
[resolved] Problem with iCal export (2 posts)

  1. awgreenblatt
    Posted 3 years ago #

    When I export an event to an iCal file, the times of my events are way off. It seems to me that the iCal file being generated is using the time of the event, but then marking that same time as UTC. So, in my case, an event scheduled for 1pm EST is showing up in my calendar at 1PM GMT, or 8am EST.

    In app/helper/class-ai1ec-exporter-helper.php, if it's not an all-day event, we have the following code:

    $dtstart = $dtend = array();
    if( $tz )
    $dtstart["TZID"] = $dtend["TZID"] = $tz;

    $e->setProperty( 'dtstart', gmdate( "Ymd\THis\Z", $ai1ec_events_helper->gmt_to_local( $event->start ) ), $dtstart );

    $e->setProperty( 'dtend', gmdate( "Ymd\THis\Z", $ai1ec_events_helper->gmt_to_local( $event->end ) ), $dtend );

    In my case, $tz is set to 'America/New_York'.

    From the looks of that code, it's converting $event->start from gmt to local time, but then outputting that local time as UTC time. I don't know if $dtstart['TZID'] is supposed to do anything. Regardless, the events are showing up 5 hours early in Outlook.


  2. Richard
    Posted 3 years ago #

    hi awgreenblatt,

    This should be fixed by v1.9 of the Ai1EC which is due soon. If you find this is not the case then please get back to us.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All-in-One Event Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic