Ed: add overmidnight test to shift_stop_times
Ed: make code clearer