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

Last connection shown with isArrivalTime=1 is unstable across different values of limit parameter #213

Open
mbeer opened this issue May 9, 2022 · 0 comments

Comments

@mbeer
Copy link

mbeer commented May 9, 2022

There is an unexpected behaviour when the connections request is used with isArrivalTime = 1 and different values of limit.

The request
https://transport.opendata.ch/v1/connections?from=Bern&to=Luzern&date=2022-05-10&time=12:00&isArrivalTime=1&limit=1
returns one connection with arrival time 11:30 (2022-05-10T11:30:00+0200) – not the one with arrival time 11:55 as shown on search.ch.

The request
https://transport.opendata.ch/v1/connections?from=Bern&to=Luzern&date=2022-05-10&time=12:00&isArrivalTime=1&limit=2
returns two connections with arrival times 10:55 and 11:01 respectively, but not those with arrival times 11:30 and 11:55.

The request
https://transport.opendata.ch/v1/connections?from=Bern&to=Luzern&date=2022-05-10&time=12:00&isArrivalTime=1&limit=3
returns three connections with arrival times 09:55, 10:01 and 10:30 respectively, but not those with arrival times 11:01, 11:30, or 11:55.

The expected behaviour would be to get the connection with arrival time 11:55 as the last connection irrespective of the value chosen for limit.

This might be linked to the change introduced by #199.

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

1 participant