X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b70da7b8ea15ab48bb2f34155567cea6dffc8fc9..8cef62cd2cec4a297e46b4f2a86c9afeadb3b283:/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