invert timezone offset
This commit is contained in:
parent
e4e4d57731
commit
29de7e1d76
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue