]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
DateTime => Time for consistency in changeset code, ok by shaun.
[rails.git] / app / controllers / changeset_controller.rb
index c820aa70528fb7daf7dfe1307e6caf07a06c5002..8f882e80e1849d81f868f29dae7c893987b5fa7a 100644 (file)
@@ -376,11 +376,11 @@ private
         times = time.split(/,/)
         raise OSM::APIBadUserInput.new("bad time range") if times.size != 2 
 
-        from, to = times.collect { |t| DateTime.parse(t) }
+        from, to = times.collect { |t| Time.parse(t) }
         return ['closed_at >= ? and created_at <= ?', from, to]
       else
         # if there is no comma, assume its a lower limit on time
-        return ['closed_at >= ?', DateTime.parse(time)]
+        return ['closed_at >= ?', Time.parse(time)]
       end
     else
       return nil
@@ -396,7 +396,7 @@ private
   ##
   # restrict changes to those which are open
   def conditions_open(open)
-    return open.nil? ? nil : ['closed_at >= ?', DateTime.now]
+    return open.nil? ? nil : ['closed_at >= ?', Time.now]
   end
 
 end