derf / Travel-Status-DE-DeutscheBahn

Commandline Public Transit Departure Monitor
https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn
Other
15 stars 3 forks source link

Support ÖBB-style JIDs & fix #6 #7

Closed deingithub closed 4 months ago

deingithub commented 5 months ago

as i've detailed in #6, the issue is that ÖBB uses much longer HAFAS IDs that don't share the DB HAFAS format. i've added logic to check if the current ID looks like an ÖBB style ID, and if so, extract the $date_ref value for cross-midnight correction from the right spot. i haven't tested this late at night yet (not sure if that's even necessary?) but testing with --date and --time seems to confirm that the library can process cross-midnight journeys again: Screenshot from 2024-02-21 11-13-36 Screenshot from 2024-02-21 11-14-33 (for debugging i added the date to departure times, this is not part of the patch)