Skip to content

fix: start_time_to was bound to end_time instead of start_time - #59

Open
arielvino wants to merge 2 commits into
hasadna:mainfrom
arielvino:fix/gtfs-rides-start-time-to
Open

fix: start_time_to was bound to end_time instead of start_time#59
arielvino wants to merge 2 commits into
hasadna:mainfrom
arielvino:fix/gtfs-rides-start-time-to

Conversation

@arielvino

@arielvino arielvino commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Fixed a bug in the router was feeding the param start_time_to on gtfs_rides into model.GtfsRide.end_time.
Causing every ride that start within the window but ends after it to be excluded.

  • Added regression test.

Example

1) how many rides START at exactly 12:00 on 2026-07-20?

curl -s 'https://open-bus-stride-api.hasadna.org.il/gtfs_rides/list?start_time_from=2026-07-20T12:00:00%2B03:00&start_time_to=2026-07-20T12:00:00%2B03:00&get_count=true'

2) ...yet here they are, listed by start_time

curl -s 'https://open-bus-stride-api.hasadna.org.il/gtfs_rides/list?start_time_from=2026-07-20T12:00:00%2B03:00&start_time_to=2026-07-20T14:00:00%2B03:00&limit=5&order_by=start_time%20asc' | jq '.[] | {id, start_time, end_time}'

@arielvino
arielvino marked this pull request as ready for review July 27, 2026 09:24
Remove test for filtering GTFS rides based on start time.
@arielvino

Copy link
Copy Markdown
Contributor Author

@OriHoch
Please review it when you have the time.
it is now live on the frontend.

Thank you!

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

Successfully merging this pull request may close these issues.

1 participant