fixed UTC (global not local anymore) + Config cache

This commit is contained in:
xdrm-brackets 2017-09-12 21:57:08 +02:00
parent 6b7baa8729
commit f571b0d1ec
3 changed files with 10 additions and 7 deletions

View File

@ -7,15 +7,12 @@
class page{
private $pagename;
/* PRE-CALL
*
* @url<String> Calling URI
*
*/
public function __construct($url){
$this->pagename = $url['page'];
}

View File

@ -241,7 +241,14 @@
}
return "${day}T$hour${min}00";
/* [3] Convert to UTC (+0)
=========================================================*/
/* (1) Get local timestamp */
$ts = strtotime("${day} $hour:$min:00");
/* (2) Return UTC date */
return gmdate("Ymd\THis", $ts);
}
@ -276,8 +283,8 @@
---------------------------------------------------------*/
foreach($events as $start_t=>$stop_t){
$RAW .= "BEGIN:VEVENT\n";
$RAW .= "DTSTART;TZID=Europe/Paris:$start_t\n";
$RAW .= "DTSTOP;TZID=Europe/Paris:$stop_t\n";
$RAW .= "DTSTART:$start_t\n";
$RAW .= "DTSTOP:$stop_t\n";
$RAW .= "SUMMARY:$type\n";
$RAW .= "END:VEVENT\n\n";
}

View File

@ -218,7 +218,6 @@
if( is_null(( $p_list = json_decode($p_list, true) )) )
throw new \Exception("Cannot parse periods list");
}