diff --git a/build/service/CalendarExtractor.php b/build/service/CalendarExtractor.php index 5b4d7d5..f810414 100644 --- a/build/service/CalendarExtractor.php +++ b/build/service/CalendarExtractor.php @@ -248,10 +248,10 @@ $tz_offset = +2; /* (2) Get GMT (UTC+0) timestamp */ - $ts = strtotime("${day} $hour:$min:00") + 3600*(-$tz_offset); + $ts = strtotime("${day} $hour:$min:00"); /* (3) Return GMT date */ - return date("Ymd\THis", $ts); + return gmdate("Ymd\THis", $ts); } @@ -286,10 +286,10 @@ ---------------------------------------------------------*/ foreach($events as $start_t=>$stop_t){ $RAW .= "BEGIN:VEVENT\n"; - $RAW .= "UID:$start_t@example.com\n"; // required $RAW .= "DTSTAMP:${start_t}Z\n"; // required $RAW .= "DTSTART:${start_t}Z\n"; $RAW .= "DTEND:${stop_t}Z\n"; + $RAW .= "UID:$start_t@xdrm.io\n"; // required $RAW .= "SUMMARY:$type\n"; $RAW .= "END:VEVENT\n\n"; } diff --git a/build/service/Updater.php b/build/service/Updater.php index 58fca82..c3d4da5 100644 --- a/build/service/Updater.php +++ b/build/service/Updater.php @@ -43,7 +43,7 @@ =========================================================*/ foreach($this->config->getDiplomes() as $d_id=>$d_name){ - file_put_contents(__ROOT__."/tmp/$d_id.ics", "BEGIN:VCALENDAR\nVERSION:2.0\n"); + file_put_contents(__ROOT__."/tmp/$d_id.ics", "BEGIN:VCALENDAR\nVERSION:2.0\nMETHOD:PUBLISH\nX-WR-CALNAME: UPPA $d_name"); /* (1) Browse each date ---------------------------------------------------------*/