Use gmmktime instead of mktime in pgdatetomy
This commit is contained in:
parent
a8ae7e8218
commit
87ff532831
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue