TheTransitClock / transitime

TheTransitClock real-time transit information system
GNU General Public License v3.0
78 stars 29 forks source link

potentially wrong handling of GTFS Time values #228

Open derhuerst opened 3 years ago

derhuerst commented 3 years ago

GTFS Time is not defined relative to midnight, but relative to noon - 12h. While that makes "writing" GTFS feeds easier, it makes processing a lot harder.

Expected functionality

As explained in my note about GTFS Time values, with the Europe/Berlin time zone (+1h standard time to +2 DST shift occurs at 2021-03-28T02:00+01:00), I expect

Describe the bug

I'm very inexperienced with Java and not familiar with this code base, but it seems that TheTransitClock is affected by this problem on those days that the DST <-> standard time switch occurs on.

I'm not sure how that actually manifests in TheTransitClock's output, but I assume that wrong delays will be calculated, or that realtime data can't be matched against static data.

I tried to identify all affected places in the code base:

Technically also these are wrong, because they convert a GTFS Time into a human-readable time string:

Version:

Just poked around in the develop source code.


related: https://github.com/google/transit/pull/15