Fix local timestamp for PostgreSQL queries
This fixes the "monitoring health" view indicating that Icinga 2 isn't updating the database, even if status_update_time uptodate. refs #2651 Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
parent
326574ba54
commit
b474482188
|
@ -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