lib/hrmparser/importer/gpx.rb in teich-hrmparser-0.4.1 vs lib/hrmparser/importer/gpx.rb in teich-hrmparser-0.4.2

- old
+ new

@@ -5,10 +5,12 @@ end def restore workout = HRMParser::Workout.new(:duration => 0) @xml = Hpricot::XML(@data) - ttime = (@xml/:time).first.innerHTML + + # Set the time based on first trackpoint. Seen an instance where the gpx begining time is wrong + ttime = (@xml/:trk/:trkpt/:time).first.innerHTML workout.time = Time.parse(ttime) trackpoints = [] distance = 0 (@xml/:trk).each do |trk| \ No newline at end of file