X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/043d29fd7eb72048cf5d07edfbc20ec5c25af708..766b53c397e410ea5b3d37e0c1cce88d85a31e26:/lib/gpx.rb?ds=sidebyside diff --git a/lib/gpx.rb b/lib/gpx.rb index 3ec11c5c4..8510df916 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -31,7 +31,7 @@ module GPX elsif reader.name == "ele" && point point.altitude = reader.read_string.to_f elsif reader.name == "time" && point - point.timestamp = DateTime.parse(reader.read_string) + point.timestamp = Time.parse(reader.read_string) end elsif reader.node_type == XML::Reader::TYPE_END_ELEMENT if reader.name == "trkpt" && point && point.valid? @@ -79,7 +79,7 @@ module GPX px = proj.x(p.longitude) py = proj.y(p.latitude) - if m > 0 + if m.positive? frames.times do |n| gc = if n == mm highlightgc.dup