[openstreetmap/openstreetmap-website] Switch to TIMESTAMP WITH TIME ZONE for current_* tables (#375)
mmd
notifications at github.com
Wed Nov 21 18:07:18 UTC 2018
I tried `alter table current_nodes alter column timestamp type timestamptz;` on a system running on UTC+1 (Eu/Berlin). Timestamps used to be correct before, and are now off by 1 or 2 hours, depending on summer/winter time. So running this statement on a non UTC+0 system seems like a bad idea.
I'm pretty sure there are some alternatives available to get this right?
```
id | latitude | longitude | changeset_id | visible | timestamp | tile | version
------------+------------+------------+--------------+---------+----------------------------+------------+---------
5002730175 | 423712670 | -834339064 | 1061 | t | 2018-06-08 20:38:42.691478 | 1701877902 | 1
http://localhost:3000/api/0.6/node/5002730175
node id="5002730175" changeset="1061" timestamp="2018-06-08T20:38:42Z
Change timestamp file column type:
alter table current_nodes alter column timestamp type timestamptz;
id | latitude | longitude | changeset_id | visible | timestamp | tile | version
------------+------------+------------+--------------+---------+-------------------------------+------------+---------
5002730175 | 423712670 | -834339064 | 1061 | t | 2018-06-08 20:38:42.691478+02 | 1701877902 | 1
http://localhost:3000/api/0.6/node/5002730175
node id="5002730175" changeset="1061" timestamp="2018-06-08T18:38:42Z"
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/375#issuecomment-440760686
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181121/c1045a81/attachment.html>
More information about the rails-dev
mailing list