diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2017-12-20 11:07:24 +0100 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2017-12-20 11:07:24 +0100 |
commit | 03a71c50bce44b21fda36624e4b45edf3bcb6edb (patch) | |
tree | ac073673833cf9b4897061b2be31b1952105fff7 /src/AppBundle/Controller/TrainScheduleController.php | |
parent | db3728baaf458aca26d740cbf2be4cf4775c6921 (diff) |
Fixed displaying of AQI on train schedule page.
Diffstat (limited to 'src/AppBundle/Controller/TrainScheduleController.php')
-rw-r--r-- | src/AppBundle/Controller/TrainScheduleController.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/AppBundle/Controller/TrainScheduleController.php b/src/AppBundle/Controller/TrainScheduleController.php index d22bbe4..0c2c2eb 100644 --- a/src/AppBundle/Controller/TrainScheduleController.php +++ b/src/AppBundle/Controller/TrainScheduleController.php @@ -58,6 +58,8 @@ class TrainScheduleController extends Controller $datetime = $datesplit[0] . "." . $datesplit[1] . ".20" . $datesplit[2] . " " . $time; $trainTimeStamp = strtotime($datetime) + 3600; + if($trainTimeStamp > time()) break; + foreach ($readings as $reading) { if (abs($reading['TimeStamp'] - $trainTimeStamp) < abs($closest - $trainTimeStamp)) $closest = $reading['TimeStamp']; |