Support » Plugin: Event post » Bug-Report: ICS File Wrong time if Summertime

  • Resolved dombucheli

    (@dombucheli)


    I have a problem, with the ics Export of these Events. As the Events are in the period of summertime, i get the wrong time, when i import these events in iCal or Outlook. Does anyone has a solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • dombucheli

    (@dombucheli)

    I could fix it for my installation, with the following ics.php code:

    <?php
    if(isset($_GET['t']) && isset($_GET['sd']) && isset($_GET['ed']) && isset($_GET['d']) && isset($_GET['a']) && isset($_GET['u'])){
    	date_default_timezone_set('Europe/Paris') ;
    	header("content-type:text/x-icalendar");
    	header("Pragma: public");
    	header("Expires: 0");
    	header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    	header("Cache-Control: public");
    	header("Content-Disposition: attachment; filename=".$_GET['u'].".ics;" );
    	echo"BEGIN:VCALENDAR\r\nVERSION:2.0\r\n";
    	$sta = array('ACCEPTED','COMPLETED');
    	$mt = strtotime($_GET['sd']);
    	$vdat = date("Ymd",$mt).'T'.date("His",$mt);
    	$vtz = $_GET['tz'];
    	$mte = strtotime($_GET['ed']);
    	$vdate = date("Ymd",$mte).'T'.date("His",$mte);
    	//str_replace('-','',$m_date).'T'.str_replace(':','',$m_heure).'Z';
    echo"BEGIN:VTIMEZONE
    TZID:Europe/London
    BEGIN:STANDARD
    DTSTART:16011028T020000
    RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
    TZOFFSETFROM:+0100
    TZOFFSETTO:-0000
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:16010325T010000
    RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
    TZOFFSETFROM:-0000
    TZOFFSETTO:+0100
    END:DAYLIGHT
    END:VTIMEZONE\r\n";	echo"BEGIN:VEVENT\r\nPRODID:agenda_eelv\r\nSUMMARY:".stripslashes($_GET['t'])."\r\nUID:".$_GET['u']."\r\nLOCATION:".stripslashes($_GET['a'])."\r\nDTEND;TZID=Europe/London:$vdate\r\nDTSTART;TZID=Europe/London:$vdat\r\nDESCRIPTION:".stripslashes($_GET['d'])."\r\nEND:VEVENT\r\n";
    	echo"END:VCALENDAR\r\n";
    }
    ?>
    • This reply was modified 5 months ago by  dombucheli.
    Plugin Author Bastien Ho

    (@bastho)

    ok, timezone seemed to be buggy since the beginning. @schulz talk about it for a while.

    Thanks to your help, I think VCS/ICS export now returns something almost consistent!

    Plugin Author Bastien Ho

    (@bastho)

    Support for winter/summer times is not added in version 4.5

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.