Merge pull request #2691 from Icinga/fix-pgsql-timestamps-2651

Fix local timestamp for PostgreSQL queries
This commit is contained in:
Eric Lippmann 2017-01-18 09:23:28 +01:00
commit 0dc528fc24
1 changed files with 1 additions and 1 deletions

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',