peter-mount / opendata

Latest & first public version of my code that monitors the UK Rail Network in real time using Open Data feeds
Other
12 stars 2 forks source link

NullPointerException when schedule crosses midnight #2

Open peter-mount opened 10 years ago

peter-mount commented 10 years ago

Sort of expected this one, if a schedule crosses midnight a NullPointerException occurs on display as no schedules are returned.

The real cause of this is down to the fact that the start time is later than the end when viewed from a LocalTime perspective. The data is correct it's just how to handle this in the SQL queries.

Example: http://dev.uktra.in/timetable/schedule/W09896/2014-10-24