format ok ?

This commit is contained in:
xdrm-brackets 2017-09-12 23:08:13 +02:00
parent f40e284e5f
commit 8c9f050e9e
2 changed files with 4 additions and 4 deletions

View File

@ -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";
}

View File

@ -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
---------------------------------------------------------*/