Cast current time to UTC when checking for closed changesets
authorTom Hughes <tom@compton.nu>
Fri, 21 Sep 2012 23:09:10 +0000 (00:09 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 21 Sep 2012 23:09:10 +0000 (00:09 +0100)
planet06_pg.cpp

index df14190..099eac2 100644 (file)
@@ -232,7 +232,7 @@ void changesets(pqxx::work &xaction) {
 
   ostringstream query;
   query << "select id, user_id, created_at, closed_at, num_changes, "
-       << "min_lat, max_lat, min_lon, max_lon, closed_at > now() as open "
+       << "min_lat, max_lat, min_lon, max_lon, closed_at > now() at time zone 'utc' as open "
        << "from changesets c order by id";
 
   icursorstream changesets(xaction, query.str(), "fetch_changesets", 1000);