From ba62df34ea8794f909407beb4b3c182994ae6031 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 26 Jan 2020 10:48:14 +0100 Subject: validate_journey: handle 0 timestamps --- lib/Travelynx.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 66cac2e..a62cb2e 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -2731,11 +2731,11 @@ sub startup { } $ref->{messages} = [ reverse @parsed_messages ]; $ref->{sched_duration} - = $ref->{sched_arr_ts} + = defined $ref->{sched_arr_ts} ? $ref->{sched_arr_ts} - $ref->{sched_dep_ts} : undef; $ref->{rt_duration} - = $ref->{rt_arr_ts} + = defined $ref->{rt_arr_ts} ? $ref->{rt_arr_ts} - $ref->{rt_dep_ts} : undef; my ( $km_route, $km_beeline, $skip ) -- cgit v1.2.3