TimeTable: correction for frequencies

in frequencies end_time might be lower than start_time, so we must loop
through the day