[pkg-nagios-changes] [Git][nagios-team/pkg-icinga2][stretch] 3 commits: Fix timestamps being stored as local time in PostgreSQL.
Bas Couwenberg
gitlab at salsa.debian.org
Tue May 1 21:12:14 BST 2018
Bas Couwenberg pushed to branch stretch at Debian Nagios Maintainer Group / pkg-icinga2
Commits:
0eb3cad6 by Felix Geyer at 2018-05-01T21:59:26+02:00
Fix timestamps being stored as local time in PostgreSQL.
- - - - -
f30ef263 by Felix Geyer at 2018-05-01T22:02:26+02:00
Update changelog
- - - - -
0dc79ff1 by Bas Couwenberg at 2018-05-01T20:12:12+00:00
Merge branch 'stretch' into 'stretch'
stretch: Fix timestamps being stored as local time in PostgreSQL.
See merge request nagios-team/pkg-icinga2!1
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/43_postgres_timezone
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+icinga2 (2.6.0-2+deb9u1) UNRELEASED; urgency=medium
+
+ * [0eb3cad] Fix timestamps being stored as local time in PostgreSQL.
+
+ -- Felix Geyer <felix.geyer at credativ.de> Tue, 01 May 2018 22:01:29 +0200
+
icinga2 (2.6.0-2) unstable; urgency=medium
* [e0f34e4] Add patch 41_ido_mysql57 - for compatibility with MySQL 5.7
=====================================
debian/patches/43_postgres_timezone
=====================================
--- /dev/null
+++ b/debian/patches/43_postgres_timezone
@@ -0,0 +1,23 @@
+From e9db716b26e49a36d733d5e224280fb63943fb9f Mon Sep 17 00:00:00 2001
+From: Michael Friedrich <michael.friedrich at 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()";
=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
21_config_changes
41_ido_mysql57
42_mips_boost_bind_workaround
+43_postgres_timezone
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-icinga2/compare/7612c810883b469a6cf5d5f6ec3b017a2ac08961...0dc79ff12cdc6bbdaa906ad87f01dd82d0acb0dd
---
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-icinga2/compare/7612c810883b469a6cf5d5f6ec3b017a2ac08961...0dc79ff12cdc6bbdaa906ad87f01dd82d0acb0dd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20180501/49c738f9/attachment-0001.html>
More information about the pkg-nagios-changes
mailing list