|author||Adrià Vilanova Martínez <email@example.com>||Mon Oct 18 01:10:33 2021 +0200|
|committer||Adrià Vilanova Martínez <firstname.lastname@example.org>||Tue Oct 19 18:02:25 2021 +0200|
Fix schedules around midnight Around midnight the app didn't work well because it didn't retrieve the correct schedules. Also, the way the frontend was architectured, trains which were scheduled after midnight appeared for 1 second and then disappeared. This CL fixes this by changing the following: - The API now returns arrival and departure times by specifying a UNIX timestamp instead of the seconds since midnight. This helps simplify the code in the frontend. - Adapting the frontend to consume the new timestamps, to fix the disappearing schedule bug. - Fixing the SQL query to get the stop times, since it didn't retrieve the correct rows. Fixed: misc:17 Change-Id: I98f1fe20d44163e716d4f57a2018635be74526d0
Schedule viewer for the Barcelona subway.
PDOclasses (specifically install the
config.phpand fill in the details (you can get an API key directly from TMB here.
$conf["databaseFile"]enter the absolute path of the location where you want to save your database (including the file name). If the website is located in the
/var/www/html/schedules/folder, you can create a new
filesfolder there and set the variable to
cron/parsegtfs.phpscript regularly to get updated information (e.g. once a week).