Skip to content

Commit

Permalink
bugfix for stationboard incorrectly adds 1 day to ALL transports when…
Browse files Browse the repository at this point in the history
… less than 1 minute passed since first transport departure.
  • Loading branch information
dragoon committed Apr 6, 2012
1 parent 9f95118 commit 69f7205
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Transport/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public function getStationBoard(StationBoardQuery $query)
// since the stationboard always lists all connections starting from now we just use the date
// and wrap it accordingly if time goes over midnight
$journeys = array();
$prevTime = time();
// subtract one minute because SBB also returns results for one minute in the past
$prevTime = time() - 60;
$date = $query->date;
if ($result->STBRes->JourneyList->STBJourney) {
foreach ($result->STBRes->JourneyList->STBJourney as $journey) {
Expand Down

0 comments on commit 69f7205

Please sign in to comment.