[OpenStreetMap] #4586: Weekly changeset dump incorrectly flagging all changesets as closed

OpenStreetMap trac at noreply.openstreetmap.org
Fri Sep 21 21:00:18 BST 2012


#4586: Weekly changeset dump incorrectly flagging all changesets as closed
--------------------+-------------------------
 Reporter:  ToeBee  |      Owner:  rails-dev@…
     Type:  defect  |     Status:  new
 Priority:  minor   |  Milestone:
Component:  api     |    Version:
 Keywords:          |
--------------------+-------------------------
 Not really a core map API problem but I don't see a more fitting component
 in trac.

 All changesets in the weekly changeset dump file are marked as being
 closed even if they are still open at the time of the dump.

 After talking about it in #osm-dev, TomH determined that it is because the
 now() function in the SQL on line 235 of
 [http://git.openstreetmap.org/planetdump.git/blob/HEAD:/planet06_pg.cpp#l235
 planet06_pg.cpp] returns server local time whereas the closed_at column is
 stored in UTC. Since closed_at is set to one hour in the future every time
 a changeset is updated, that comparison will always return false.

 A possible fix is to change "now()" to "now() at time zone 'utc' "

-- 
Ticket URL: <https://trac.openstreetmap.org/ticket/4586>
OpenStreetMap <http://www.openstreetmap.org/>
OpenStreetMap is a free editable map of the whole world



More information about the rails-dev mailing list