Fix local timestamp for PostgreSQL queries

(cherry picked from commit 0dc528fc24)
This commit is contained in:
Eric Lippmann 2017-01-18 09:23:28 +01:00
parent eca2dd7b9f
commit 2b0be19fd2
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ abstract class IdoQuery extends DbQuery
$column $column
); );
if (version_compare($this->getIdoVersion(), '1.14.2', '>=')) { if (version_compare($this->getIdoVersion(), '1.14.2', '>=')) {
$column = str_replace('NOW()', 'localtimestamp', $column); $column = str_replace('NOW()', 'NOW() AT TIME ZONE \'UTC\'', $column);
} else { } else {
$column = preg_replace( $column = preg_replace(
'/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i', '/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i',