opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.2k stars 1.03k forks source link

Trips outside timewindow is returned when dateTime is not set #3713

Closed andtry closed 2 years ago

andtry commented 2 years ago

If dateTime is not set, expected behavior is to set this to now.

However, when this parameter is not set you will get itineraries outside the searchwindow.

https://api.entur.io/graphql-explorer/journey-planner-v3-beta?query=%7B%0A%20%20%20%20trip%28%0A%20%20%20%20from%3A%20%7B%0A%20%20%20%20%20%20place%3A%20%22NSR%3AStopPlace%3A58366%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20to%3A%20%7B%0A%20%20%20%20%20%20place%3A%20%22NSR%3AStopPlace%3A6288%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20modes%3A%20%7B%0A%20%20%20%20%20%20transportModes%3A%20%5B%7B%0A%20%20%20%20%20%20%20%20transportMode%3A%20rail%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20transportMode%3A%20bus%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20transportMode%3A%20coach%0A%20%20%20%20%20%20%7D%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20dateTime%3A%20%222021-11-02T09%3A25%3A00%2B01%3A00%22%2C%0A%20%20%20%20walkSpeed%3A%201.3%2C%0A%20%20%20%20searchWindow%3A%2060%2C%0A%20%20%20%20arriveBy%3A%20false%0A%20%20%29%20%7B%0A%20%20%20%20metadata%7B%0A%20%20%20%20%20%20searchWindowUsed%0A%20%20%20%20%20%20prevDateTime%0A%20%20%20%20%20%20nextDateTime%0A%20%20%20%20%7D%0A%20%20%20%0A%20%20%20%20tripPatterns%20%7B%0A%20%20%20%20%20%20expectedStartTime%0A%20%20%20%20%20%20legs%20%7B%0A%20%20%20%20%20%20%20%20authority%20%7B%0A%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20mode%0A%20%20%20%20%20%20%20%20line%20%7B%0A%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20publicCode%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A&variables=

t2gran commented 2 years ago

When the OTP server starts up it create a default request, this is populated with the default values in the configuration file. But, the dateTime is also set to now()and this is used in routing requests where the dateTime is not set.