[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#896811: marked as done (stretch-pu: package icinga2/2.6.0-2+deb9u1)



Your message dated Sat, 16 Feb 2019 11:36:33 +0000
with message-id <1550316993.21192.50.camel@adam-barratt.org.uk>
and subject line Closing bugs for updates included in 9.8
has caused the Debian Bug report #896811,
regarding stretch-pu: package icinga2/2.6.0-2+deb9u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
896811: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896811
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

Icinga2 2.6.0 stores timestamps as local time instead of UTC in the
database when the PostgreSQL IDO backend is used.

The result is that Icinga Web 2 displays all date/times with an offset
(unless system time is UTC of course).
While you could argue that this is only a cosmetic problem I think it's
important for a monitoring system to display the correct time.

This has been fixed upstream in 2.6.1.
Bug report is at https://github.com/Icinga/icinga2/issues/4874

I'd like to upload this fix to stretch, debdiff is attached.

Felix 
diff -Nru icinga2-2.6.0/debian/changelog icinga2-2.6.0/debian/changelog
--- icinga2-2.6.0/debian/changelog	2016-12-19 16:13:45.000000000 +0100
+++ icinga2-2.6.0/debian/changelog	2018-04-23 15:47:44.000000000 +0200
@@ -1,3 +1,9 @@
+icinga2 (2.6.0-2+deb9u1) stretch; urgency=medium
+
+  * Fix timestamps being stored as local time in PostgreSQL.
+
+ -- Felix Geyer <felix.geyer@credativ.de>  Mon, 23 Apr 2018 15:47:44 +0200
+
 icinga2 (2.6.0-2) unstable; urgency=medium
 
   * [e0f34e4] Add patch 41_ido_mysql57 - for compatibility with MySQL 5.7
diff -Nru icinga2-2.6.0/debian/patches/43_postgres_timezone icinga2-2.6.0/debian/patches/43_postgres_timezone
--- icinga2-2.6.0/debian/patches/43_postgres_timezone	1970-01-01 01:00:00.000000000 +0100
+++ icinga2-2.6.0/debian/patches/43_postgres_timezone	2018-04-18 08:17:02.000000000 +0200
@@ -0,0 +1,23 @@
+From e9db716b26e49a36d733d5e224280fb63943fb9f Mon Sep 17 00:00:00 2001
+From: Michael Friedrich <michael.friedrich@netways.de>
+Date: Wed, 11 Jan 2017 17:34:09 +0100
+Subject: [PATCH] Ensure that PostgreSQL timestamps are UTC
+
+fixes #13617
+---
+ lib/db_ido_pgsql/idopgsqlconnection.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp
+index f398fda50..c16f9f50f 100644
+--- a/lib/db_ido_pgsql/idopgsqlconnection.cpp
++++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp
+@@ -636,7 +636,7 @@ bool IdoPgsqlConnection::FieldToEscapedString(const String& key, const Value& va
+ 	} else if (DbValue::IsTimestamp(value)) {
+ 		long ts = rawvalue;
+ 		std::ostringstream msgbuf;
+-		msgbuf << "TO_TIMESTAMP(" << ts << ")";
++		msgbuf << "TO_TIMESTAMP(" << ts << ") AT TIME ZONE 'UTC'";
+ 		*result = Value(msgbuf.str());
+ 	} else if (DbValue::IsTimestampNow(value)) {
+ 		*result = "NOW()";
diff -Nru icinga2-2.6.0/debian/patches/series icinga2-2.6.0/debian/patches/series
--- icinga2-2.6.0/debian/patches/series	2016-12-16 18:28:37.000000000 +0100
+++ icinga2-2.6.0/debian/patches/series	2018-04-18 08:56:34.000000000 +0200
@@ -1,3 +1,4 @@
 21_config_changes
 41_ido_mysql57
 42_mips_boost_bind_workaround
+43_postgres_timezone

--- End Message ---
--- Begin Message ---
Version: 9.8

Hi,

The update referenced by each of these bugs was included in this
morning's stretch point release.

Regards,

Adam

--- End Message ---

Reply to: