sort journeys by departure time

This commit is contained in:
Daniel Friesel 2019-03-30 21:43:35 +01:00
parent df34c58cc5
commit 341665c79b

View file

@ -1067,6 +1067,13 @@ qq{select * from pending_mails where email = ? and num_tries > 1;}
} @travels;
}
# user_actions are sorted by action_time. As users are allowed to check
# into trains in arbitrary order, action_time does not always
# correspond to departure/arrival time, so we ensure a proper sort
# order here.
@travels
= sort { $b->{rt_departure} <=> $a->{rt_departure} } @travels;
return @travels;
}
);