X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d581f1766532e9b92565e7af4ed086fdda8d780a..3a386f185c954d71a9b5d0747d017f99c8ccb6ff:/app/controllers/changeset_controller.rb?ds=sidebyside diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index fbd4417d0..898afae4a 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -516,13 +516,13 @@ class ChangesetController < ApplicationController times = time.split(/,/) raise OSM::APIBadUserInput, "bad time range" if times.size != 2 - from, to = times.collect { |t| DateTime.parse(t) } + from, to = times.collect { |t| Time.parse(t) } return changesets.where("closed_at >= ? and created_at <= ?", from, to) else # if there is no comma, assume its a lower limit on time - return changesets.where("closed_at >= ?", DateTime.parse(time)) + return changesets.where("closed_at >= ?", Time.parse(time)) end - # stupid DateTime seems to throw both of these for bad parsing, so + # stupid Time seems to throw both of these for bad parsing, so # we have to catch both and ensure the correct code path is taken. rescue ArgumentError => ex raise OSM::APIBadUserInput, ex.message.to_s