Merge pull request #2691 from Icinga/fix-pgsql-timestamps-2651
Fix local timestamp for PostgreSQL queries
This commit is contained in:
commit
0dc528fc24
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue