fixed UTC (global not local anymore) + Config cache
This commit is contained in:
parent
6b7baa8729
commit
f571b0d1ec
|
@ -7,15 +7,12 @@
|
|||
class page{
|
||||
|
||||
|
||||
private $pagename;
|
||||
|
||||
/* PRE-CALL
|
||||
*
|
||||
* @url<String> Calling URI
|
||||
*
|
||||
*/
|
||||
public function __construct($url){
|
||||
$this->pagename = $url['page'];
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -218,7 +218,6 @@
|
|||
if( is_null(( $p_list = json_decode($p_list, true) )) )
|
||||
throw new \Exception("Cannot parse periods list");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue