aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2017-12-20 11:07:24 +0100
committermarcinzelent <zelent.marcin@gmail.com>2017-12-20 11:07:24 +0100
commit03a71c50bce44b21fda36624e4b45edf3bcb6edb (patch)
treeac073673833cf9b4897061b2be31b1952105fff7 /src
parentdb3728baaf458aca26d740cbf2be4cf4775c6921 (diff)
Fixed displaying of AQI on train schedule page.
Diffstat (limited to 'src')
-rw-r--r--src/AppBundle/Controller/TrainScheduleController.php2
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'];