-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
common GTFS time bug "on those days that the DST <-> standard time switch occurs on" also affects this package #175
Comments
If this is not the case, please excuse me for the noise, and close this Issue! |
Thanks @derhuerst, that's all very concerning! I don't have time right now to look further, but will definitely be keeping an eye on here to see where this takes us. It must also affect |
Thanks, I have some trouble wrapping my head around it at the moment. However, as an initial reaction I'd say this is more of an issue for feed providers than consumers. tidytransit does not use UNIX datetime values (like Generally, I haven't really run into issues with the feeds I work with (well, we rarely focus on saturday nights). Also, I'd really like to avoid adding timezones in tidytransit... |
I can relate. 😄 I keep forgetting the details of this weird date/time handling after a while, and have to get familiar with it again.
Both, right? Providers/authors need to know about this when transferring their timetables into GTFS, and consumers need to know about it when processing GTFS.
I'm not sure about
Sounds like another issue.
I made the experience, that this kind of bug is very hard to come across in practice, but at least in Germany, there are many trips running across the DST <-> standard time boundaries. Another problem is that so many public-transport-related software has buggy date/time handling, even widely use ones, so it's hard to identify the intended behaviour.
In this case, I'd propose to clearly document this shortcoming somewhere, so that users of tidytransit are aware of the consequences. |
Totally agree on your concluding statement @derhuerst! |
Yes, of course. I guess my point is that tidytransit should just handle feeds "as is" and not try to fix incorrect data. I'm still not sure if that point really applies though 😅
Well, it doesn't handle routing across date boundaries... However, that's not explicitly documented. The date used in
They exist in Switzerland as well, there are actually more than 6000 trips running between 00:00 and 03:00 on October 31st this year (assuming my calculations in this gist are correct).
Definitely. A lot of this issue comes down to properly documenting assumptions and intended behavoir. |
Just to prevent a misunderstanding: If you're talking about programmatically "guessing" that the provider/author of the GTFS feed violated the spec by using a more intuitive definition of day-relative time: Let's not do that. 😄 |
would be great if we could link to a concise and clear explanation of this bug with demonstrated impact for users. |
We could add this to https://gist.github.com/derhuerst/574edc94981a21ef0ce90713f1cff7f6. You're very welcome to propose in a comment on what to add to it! |
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 at2021-03-28T02:00+01:00
), I expectdeparture_time
of00:30
of a trip running on2021-03-28
to happen at1616884200
/2021-03-28T00:30+02:00
, not at1616887800
/2021-03-28T00:30+01:00
;departure_time
of06:30
of a trip running on2021-03-28
to 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:
tidytransit/R/frequencies.R
Line 59 in d738c16
tidytransit/R/raptor.R
Line 185 in d738c16
tidytransit/R/raptor.R
Line 204 in d738c16
related: google/transit#15
The text was updated successfully, but these errors were encountered: