From 51f264091610b0f2a9c10e1f656c757346af2b60 Mon Sep 17 00:00:00 2001 From: Riccardo Di Dato Date: Mon, 18 Apr 2016 15:58:36 +0200 Subject: [PATCH] fix timezone statistiche --- public/admin/statCustom.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/admin/statCustom.php b/public/admin/statCustom.php index 0dde811..66ce1f8 100644 --- a/public/admin/statCustom.php +++ b/public/admin/statCustom.php @@ -25,8 +25,17 @@ $end = time(); $action = PostHandler::get("action"); if (!is_null($action) && strcmp($action, "show")==0){ $showGraph = true; - $start = strtotime(PostHandler::get("start")." 00:01"); - $end = strtotime(PostHandler::get("end")." 23:59"); + + + $date = new DateTime(PostHandler::get("start")." 00:00", new DateTimeZone("Europe/Rome")); + $start = $date->format('U'); + + $date = new DateTime(PostHandler::get("end")." 23:59", new DateTimeZone("Europe/Rome")); + $end = $date->format('U'); + + +// $start = strtotime(PostHandler::get("start")." 00:00"); +// $end = strtotime(PostHandler::get("end")." 23:59"); } ?>