Use gmmktime instead of mktime in pgdatetomy

This commit is contained in:
pezcurrel 2022-11-01 07:44:55 +01:00
parent a8ae7e8218
commit 87ff532831

View file

@ -264,7 +264,7 @@ while($row=mysqli_fetch_assoc($res)) {
function pgdatetomy($pgdate) {
//2018-04-07T15:05:26.801Z
if (preg_match('/^(\d+)-(\d+)-(\d+)[ T]{1}(\d+):(\d+):(\d+)(\.\d+)?Z?$/',$pgdate,$buf)===1) {
$mtime=mktime($buf[4],$buf[5],$buf[6],$buf[2],$buf[3],$buf[1]);
$mtime=gmmktime($buf[4],$buf[5],$buf[6],$buf[2],$buf[3],$buf[1]);
if (array_key_exists(7,$buf))
$mtime=$mtime+floatval('0'.$buf[7]);
return($mtime);