Hi Konos, all,
After considering a few options, we plan to alter the behavior of the schedules call when given early-in-the-morning time filters, and define the meaning of the parameters and the behavior of the call more precisely.
Once the planned change is in place, this is how we will define the behavior:
When using the schedules call, filter[date] refers to the the date that service is associated with in GTFS by way of calendars.txt and calendar_dates.txt. Filter[min_time] and filter[max_time] refer to the time on that date. To get the last few trips that are part of the Friday 1/6/18 schedule, clients should use the date 1/6/18, even if those trips run just after midnight. Getting service for multiple service dates requires multiple calls.
Under this implementation, the following behavior is what you should expect from the schedules call:
filter[date] | filter[min_time] | filter[max_time] | Results |
2018-01-06 | 12:00 | 14:00 | Service from noon to 2pm on Friday 1/6; no change there. |
2018-01-06 | 24:00 | 26:00 | Service at the end of the Friday 1/6 schedule, which take place after midnight (in the early morning hours of Saturday 1/7.) |
2018-01-07 | 00:00 | 02:00 | Returns no results, since there is no service scheduled that early in the morning as part of the Saturday 1/7 schedule. |
Please let us know if you have any feedback.
Sincerely,
developer@mbta