invert timezone offset

This commit is contained in:
xdrm-brackets 2017-09-12 22:30:30 +02:00
parent e4e4d57731
commit 29de7e1d76
1 changed files with 7 additions and 4 deletions

View File

@ -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);
}