Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #13617] IDO: Timestamps in PostgreSQL may still have a time zone offset #4874

Closed
icinga-migration opened this issue Dec 15, 2016 · 6 comments
Labels
area/db-ido Database output bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13617

Created by elippmann on 2016-12-15 14:45:34 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2017-01-11 16:39:24 +00:00)
Target Version: 2.6.1
Last Update: 2017-01-12 14:54:47 +00:00 (in Redmine)

Icinga Version: 2.6.0
Backport?: Not yet backported
Include in Changelog: 1

Icinga 2 inserts timestamps w/ PostgreSQL's TO_TIMESTAMP function. This will include PostgreSQL's time zone offset. Either use FROM_UNIXTIME or TO_TIMESTAMP(...) AT TIME ZONE 'UTC'.

Changesets

2017-01-11 16:34:09 +00:00 by mfriedrich e9db716

Ensure that PostgreSQL timestamps are UTC

fixes #13617

Relations:

@icinga-migration
Copy link
Author

Updated by elippmann on 2016-12-15 15:11:50 +00:00

  • Relates set to 13607

@icinga-migration
Copy link
Author

Updated by Robistar81 on 2017-01-11 12:24:28 +00:00

This Bug also affected the HA mode between two and more master nodes. Failover Node will currently wait -3600 seconds to start 60 seconds failover timeout.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2017-01-11 13:06:26 +00:00

  • Target Version set to 2.6.1

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2017-01-11 14:31:18 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

Note: from_unixtime() inside pgsql.sql isn't used anywhere, fixing this inline in the library code.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2017-01-11 16:39:24 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset e9db716.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2017-01-12 14:54:47 +00:00

The timestamps written to DB IDO are now UTC, the handling in Icinga Web 2 works - except for the monitoring health column "is_currently_running". This uses localtimestamp which returns a timestamp with timezone, but not UTC. Will be dealt with in #13607.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-ido Database output bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant