X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9018d1af07c53b03bf8caf0480b931dc25f57147..dd676f2257f442d427e0bce4c2984fb5e3488f62:/lib/gpx.rb diff --git a/lib/gpx.rb b/lib/gpx.rb index 71b2823b8..274ece7d9 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -22,7 +22,7 @@ module GPX elsif reader.name == "ele" && point point.altitude = reader.read_string.to_f elsif reader.name == "time" && point - point.timestamp = Time.parse(reader.read_string) + point.timestamp = Time.parse(reader.read_string).utc end when XML::Reader::TYPE_END_ELEMENT if reader.name == "trkpt" && point && point.valid? @@ -121,7 +121,7 @@ module GPX output = StringIO.new image.export(output) - output.read + output end def icon(min_lat, min_lon, max_lat, max_lon) @@ -161,7 +161,7 @@ module GPX end end - image.gif + StringIO.new(image.gif) end end