X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/41f95466faf0cdf3aed3be70f88f0a23d17b420e..55b2ddc6dfc8e36f135836d54a16d17bdb6f8372:/lib/gpx.rb?ds=inline 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