openmove / OpenTripPlanner

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

Strange behaviour for api get stoptimes #5

Closed zabuTNT closed 1 year ago

zabuTNT commented 2 years ago

https://github.com/openmove/odh-mentor-otp/issues/113

zabuTNT commented 2 years ago

API works if the timerange is > of 24H. With 86460 seconds it works, with 86400 doesn't. If I put 0 as timestamp it works even with 86400 seconds, because in the code:

 if (startTime == 0) {
            startTime = System.currentTimeMillis() / 1000;
        }

So the day seconds are not at midnight.

Probably the issue start here: https://github.com/openmove/OpenTripPlanner/blob/openmove/src/main/java/org/opentripplanner/routing/graph/GraphIndex.java#L435

int days = (int) Math.ceil((double) timeRange / 86400);

Keep to investigate