[dev.icinga.com #2203] pgsql unix_timestamp cannot handle timstamp with timezone #825
Comments
Updated by mfriedrich on 2011-12-16 09:29:00 +00:00 corrected function.
working query, respecting timezones
some tests.
|
Updated by mfriedrich on 2011-12-16 11:24:28 +00:00
ok, this is happening with enable_sla=1 in ido2db.cfg
fixed function
|
Updated by mfriedrich on 2011-12-16 11:43:35 +00:00
this affects from_unixtime too. http://www.postgresql.org/docs/8.4/interactive/functions-formatting.html by default, to_timestamp will return timestamp with time zone, but as a matter of fact we cast that to ::timezone removing the time zone awareness of this function.
so timestamps passed as utc will not be saved correctly within their given timezone, but default anyways. since from_unixtime is being used within the most queries, the function must remain. changing a return type will require the function to be dropped and then created again instead if replacing it. old behaviour.
in current +1 timezone.
get onto utc
so currently timestamps are not timezone aware as they should be. depends on general discussion how and when to fix this. |
Updated by mfriedrich on 2011-12-16 12:59:18 +00:00 fixed version
|
Updated by mfriedrich on 2012-02-23 21:49:11 +00:00
|
Updated by mfriedrich on 2012-04-03 10:59:44 +00:00 any feedback on that? |
Updated by mfriedrich on 2012-04-19 13:46:45 +00:00 good, no one gives a f*ck, like usual. thanks for no feedback, then i'll apply that. |
Updated by mfriedrich on 2012-04-19 13:58:48 +00:00
|
Updated by Tommi on 2012-04-26 19:24:57 +00:00 I am sorry, but currently i have only mysql and oracle available. In general it should follow the logic we introduced for the tables timestamp values. There i did the same tests. When connecting set session timezone=UTC' will be executed. Therefore all incoming data should be in UTC, which is also expected from the other databases. |
Updated by mfriedrich on 2012-04-26 20:21:10 +00:00 well i know your rdbms, it was meant for everyone else. anyhow, my tests run fine, i still need to test this against icinga-web if the other related issues i had are gone. maybe tomorrow. |
Updated by mfriedrich on 2012-04-27 17:13:13 +00:00
from the normal operations, everything works fine. icinga-web got other issues, which do not harm the resolval here. |
Updated by mfriedrich on 2014-12-08 14:37:29 +00:00
|
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2203
Created by mfriedrich on 2011-12-16 08:43:57 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2012-04-27 17:13:13 +00:00)
Target Version: 1.7
Last Update: 2014-12-08 14:37:29 +00:00 (in Redmine)
the function unix_timestamp is self written and does not respect the timezone, therefore creating an error.
below is the look before, and after applying 1.6.0 upgrade, failing on the query.
Changesets
2012-04-19 14:05:30 +00:00 by mfriedrich d179dea
Relations:
The text was updated successfully, but these errors were encountered: