From: Michael Friedrich Date: Mon, 17 Sep 2018 07:51:20 +0000 (+0200) Subject: Ensure to use UTC timestamps for IDO PgSQL cleanup queries X-Git-Tag: v2.10.0~27^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d36546a994258a66ad9758e4583907def9e3f89;p=icinga2 Ensure to use UTC timestamps for IDO PgSQL cleanup queries refs #6584 --- diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp index 9771d4027..16e0b567d 100644 --- a/lib/db_ido_pgsql/idopgsqlconnection.cpp +++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp @@ -947,7 +947,7 @@ void IdoPgsqlConnection::InternalCleanUpExecuteQuery(const String& table, const Query("DELETE FROM " + GetTablePrefix() + table + " WHERE instance_id = " + Convert::ToString(static_cast(m_InstanceID)) + " AND " + time_column + - " < TO_TIMESTAMP(" + Convert::ToString(static_cast(max_age)) + ")"); + " < TO_TIMESTAMP(" + Convert::ToString(static_cast(max_age)) + ") AT TIME ZONE 'UTC'"); } void IdoPgsqlConnection::FillIDCache(const DbType::Ptr& type)