Skip to content

Commit

Permalink
Fix Stop Time Calculation with Fast Data
Browse files Browse the repository at this point in the history
  • Loading branch information
consindo committed Nov 22, 2016
1 parent aea5cba commit e40e744
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/station.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,12 @@ var station = {

var trips = JSON.parse(body).response
trips.forEach(function(trip) {
var depTimeSplit = trip.departure_time.split(':')
var arrTime = parseInt(depTimeSplit[0]*3600) + parseInt(depTimeSplit[1]*60) + parseInt(depTimeSplit[2])

filteredTrips.push({
trip_id: trip.trip_id,
arrival_time_seconds: trip.departure_time,
arrival_time_seconds: arrTime,
stop_sequence: trip.stop_sequence
})
})
Expand Down

0 comments on commit e40e744

Please sign in to comment.