From 29de7e1d7655ad380dc026ea14fb93f776e6947d Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 12 Sep 2017 22:30:30 +0200 Subject: [PATCH] invert timezone offset --- build/service/CalendarExtractor.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build/service/CalendarExtractor.php b/build/service/CalendarExtractor.php index 9d69604..7b6b490 100644 --- a/build/service/CalendarExtractor.php +++ b/build/service/CalendarExtractor.php @@ -244,11 +244,14 @@ /* [3] Convert to GMT (UTC+0) =========================================================*/ - /* (1) Get GMT (UTC+0) timestamp */ - $ts = strtotime("${day} $hour:$min:00"); + /* (1) Set fixed timezone offset */ + $tz_offset = +2; - /* (2) Return GMT date */ - return gmdate("Ymd\THis", $ts); + /* (2) Get GMT (UTC+0) timestamp */ + $ts = strtotime("${day} $hour:$min:00") + 3600*(-$tz_offset); + + /* (3) Return GMT date */ + return date("Ymd\THis", $ts); }