WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Problem with iCal export

[Resolved] Problem with iCal export

  • 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.

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

Viewing 1 replies (of 1 total)
  • Richard

    @richardgirling

    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.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Problem with iCal export’ is closed to new replies.