From c96089523cb4b3df32093fc691375c682b6195da Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 17 Sep 2017 14:17:09 +0200 Subject: [PATCH] Set displayed date (view) to UTC+2 ('Europe/Paris') --- build/router/controller/ics.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/router/controller/ics.php b/build/router/controller/ics.php index d939bde..536b138 100644 --- a/build/router/controller/ics.php +++ b/build/router/controller/ics.php @@ -135,11 +135,15 @@ $stop_hour = 0; /* (2.4.1) Extract time in hour */ - if( preg_match('@^(\d+):(\d+)$@', $course['startd'], $m) ) + if( preg_match('@^(\d+):(\d+)$@', $course['startd'], $m) ){ $start_hour = $m[1] + $m[2]/60; + $course['startd'] = ($m[1]+2) .':'. $m[2]; + } - if( preg_match('@^(\d+):(\d+)$@', $course['stopd'], $m) ) + if( preg_match('@^(\d+):(\d+)$@', $course['stopd'], $m) ){ $stop_hour = $m[1] + $m[2]/60; + $course['stopd'] = ($m[1]+2) .':'. $m[2]; + } /* (2.4.2) Calc positionning */ $top = ($start_hour-CE::$start_h) * $cal_height / (CE::$stop_h-CE::$start_h);