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

Matt Amos notifications at github.com
Tue Jul 23 09:14:21 UTC 2013


In my opinion the best option would be to fix the actual bugs. I've looked through the source very briefly and couldn't find anywhere we weren't converting to UTC. The issue may be something along the lines that Postgres (or the client library) is assuming "without timezone" means "in local timezone", in which case there should be a much simpler fix than converting to "with timezone". A simple work-around may be [to set $TZ](http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html) when running Osmosis.

Anecdotally, my experience of writing systems with timestamp information is that it's always easier to keep data internally in UTC at all times and only convert when presenting data to the user. In OSM, I don't think we ever convert out of UTC - all API-generated timestamps should be UTC, and uploaded timestamps are ignored.

In my opinion, timestamp and timezone information are qualitatively very different: the timestamp indicates a particular point in time which is unambiguous to a computer, whereas timezones are only useful as a presentation mechanism to a human. The prevalence of `time_t` in POSIX APIs would seem to indicate that the designers shared this opinion.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/375#issuecomment-21402057
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20130723/ce50e7f8/attachment-0001.html>


More information about the rails-dev mailing list