fix timezone on wiki rencontres script

This commit is contained in:
mose 2019-09-09 13:41:10 +08:00
parent 4ffe1e1090
commit d112fb302d

View file

@ -3,6 +3,7 @@
require 'db/local.php'; require 'db/local.php';
setlocale(LC_ALL, "fr_FR.UTF8"); setlocale(LC_ALL, "fr_FR.UTF8");
date_default_timezone_set("Europe/Paris");
$db = new mysqli('localhost', $user_tiki, $pass_tiki, $dbs_tiki); $db = new mysqli('localhost', $user_tiki, $pass_tiki, $dbs_tiki);
@ -42,7 +43,7 @@ function getevents($list) {
$back = array(); $back = array();
foreach ($list as $id => $date) { foreach ($list as $id => $date) {
$d = date_create(); $d = date_create();
date_timestamp_set($d, $date); localtime(date_timestamp_set($d, $date));
$event = array( $event = array(
'id' => $id, 'id' => $id,
'date' => strftime("%A %e %B", $date) 'date' => strftime("%A %e %B", $date)