-
Notifications
You must be signed in to change notification settings - Fork 22
Description
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
- the
departure_timeof00:30of a trip running on2021-03-28to happen at1616884200/2021-03-28T00:30+02:00, not at1616887800/2021-03-28T00:30+01:00; - the
departure_timeof06:30of a trip running on2021-03-28to happen at1616905800/2021-03-28T06:30+02:00, not at1616909400/2021-03-28T06:30+01:00.
Describe the bug
I'm very inexperienced with R and not that familiar with this code base, but it seems that tidytransit 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 tidytransit'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 find some places in the code base:
Line 59 in d738c16
filter(departure_time >= start_time & arrival_time <= end_time) %>% Line 185 in d738c16
departures_marked <- departures_marked[departure_time_num > journey_arrival_time,] Line 204 in d738c16
arrival_candidates <- arrival_candidates[departure_time_num > marked_departure_time_num]
related: google/transit#15