Skip to content
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

What is the use of addLateNightServices? #86

Open
miklcct opened this issue May 2, 2024 · 5 comments
Open

What is the use of addLateNightServices? #86

miklcct opened this issue May 2, 2024 · 5 comments

Comments

@miklcct
Copy link
Contributor

miklcct commented May 2, 2024

Upon studying the code, addLateNightServices add a copy of the service to the previous day. Won't it produce duplicated service entries?

@linusnorton
Copy link
Collaborator

linusnorton commented May 2, 2024

Yes, it does. Trains in the DTD system start their day at 4am, which is different to GTFS (and any sane person). I believe that code will look at trains after midnight the previous day and add them in the correct day. I believe they may end up being duplicated at 24:00+ departure trains (e.g. departing 25:30) which is completely valid in GTFS.

It's been many years since I looked at some of this so the details might be off but I believe that's it.

@miklcct
Copy link
Contributor Author

miklcct commented May 2, 2024

The effect of the code is to add a copy of a train departing Monday 00:30 to depart at Sunday 24:30. I believe it may result in departure boards showing duplicate trains, however I haven't verified it yet in my deployment.

Btw are you the maintainer of gtfs.pro ?

@linusnorton
Copy link
Collaborator

linusnorton commented May 2, 2024

No that's not me. I'm not actually involved with any rail stuff any more. Most of this stuff is just on life support.

@miklcct
Copy link
Contributor Author

miklcct commented May 14, 2024

It does create duplicated journeys. Note that 00:52 appears twice for the London Overground.

Here is the output of our client now, which is connected to a server with a feed generated by a version without the call removed.

Screenshot_20240515-004549.png

@linusnorton
Copy link
Collaborator

I just re-read the code and it came back to me. Please ignore my first reply.

This was a hack I put in so that when you searched for journeys at the end of the day (e.g. 23:30) it would make connections with services after midnight without having to look for them on the next day.

I suggest we add a flag to disable this behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants