Fix local timestamp for PostgreSQL queries

(cherry picked from commit 0dc528fc243ec9ce161afe2f2ae5215aa4c5a684)
This commit is contained in:
Eric Lippmann 2017-01-18 09:23:28 +01:00
parent eca2dd7b9f
commit 2b0be19fd2

View File

@ -656,7 +656,7 @@ abstract class IdoQuery extends DbQuery
$column
);
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 {
$column = preg_replace(
'/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i',