I found the problem en solved it for the expected departures, that it isn't sorted correctly.
Just change the query to the following code:
<?php $query = 'SELECT * FROM '.TABLE_PREFIX.'schedules ORDER BY deptime,arrtime + 0';
$list = DB::get_results($query); ?>