Feature #2092

Add changed idoutils timestamp behavior to docs

Added by Tommi over 4 years ago. Updated over 4 years ago.

Status:ResolvedStart date:11/19/2011
Priority:NormalDue date:
Assignee:Wolfgang% Done:


Target version:Icinga 1.x - 1.6


Starting with icinga 1.6 all dates are stored as local timestamps in the database. Before there was a diffent behavior storing and retrieving dates for each database system, which was difficult to handle for frontend apps. Therefore datatypes has been changed for mysql from DATETIME to TIMESTAMP and for oracle from DATE to LOCAL TIMESTAMP (0). Postgresql is already using TIMESTAMP. IDO2DB will set session timezone to UTC and store all unix timestamp (which are UTC per definition) with UTC. Please make sure your system returns Unix timestamps as real UTC based values (like "date -u '+%s'")
Make sure your database session runs in the same timezone in which the existing dates has been stored (e.g.your local timezone oracle:"select sessiontimezone from dual;"), if you are running the upgrade script.
Additional for your convinience in oracle you should set your session timestamp format to the value you want,e.g "alter session set nls_timestamp_format='YYYY-MM-DD HH24:MI:SS';" or similar.
Now you can see entries from different icinga installations which are in different time zones into the same database and regardless from where you accessing it, all entries are returned in your local time zone.

Related issues

Related to Core, Classic UI, IDOUtils - Bug #1954: Oracle date field doesn't respect Timezones Resolved 09/26/2011
Related to Core, Classic UI, IDOUtils - Feature #2106: change timestamp to use time zone by default in postgresql Resolved 11/22/2011


#1 Updated by Wolfgang over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Wolfgang
  • % Done changed from 0 to 70

changed in git master

#2 Updated by dnsmichi over 4 years ago

  • Category set to IDOUtils
  • Status changed from Assigned to Resolved
  • % Done changed from 70 to 100

looks good.

#3 Updated by Tommi over 4 years ago

  • Status changed from Resolved to Assigned

because of #2106 the sentence Postgresql is already using TIMESTAMP must be changed into Postgresql is already using TIMESTAMP, but changed to TIMESTAMP WITH TIME ZONE

Sorry for reopen this.

#4 Updated by Wolfgang over 4 years ago

  • Status changed from Assigned to Resolved

fixed in r1.6

Also available in: Atom PDF