[openstreetmap/openstreetmap-website] Switch to TIMESTAMP WITH TIME ZONE for current_* tables (#375)

Andy Allan notifications at github.com
Mon Nov 26 14:42:17 UTC 2018

> Contrary to some earlier statements, **cgimap shows incorrect timestamps now**, in case the server isn't running on UTC+0.

OK, I mentioned to @tomhughes last week that I feared this might be the case and that it needs more investigation. From my initial investigations it appears that there isn't a version of `to_char` that takes `timestampz`, so it is most likely converting `timestampz` to `timestamp` and then doing the character formatting.

> I think we would have to add `at time zone 'UTC'` to all statements for a correct timestamp then. This change however needs to be exactly in sync with changing the column type to "timestamp with time zone" to avoid incorrect timestamps on a non-UTC system.

If there's a way to avoid the synchronous changes, that would be worth looking into. For example, cgimap could try column type detection, or we can find a different time formatting function, or so on. Basically we should try to come up with a solution that allows cgimap to work with both timestamp and timestampz columns interchangeably.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181126/b0a6b426/attachment.html>

More information about the rails-dev mailing list