diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-01-26 10:48:14 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-26 10:48:14 +0100 |
commit | ba62df34ea8794f909407beb4b3c182994ae6031 (patch) | |
tree | 944a739bd26a1808a7193f21b219d43786134c4d /lib/Travelynx.pm | |
parent | c31254e996a0b2ddc03fdecdb27ab262b88911d1 (diff) |
validate_journey: handle 0 timestamps
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 4 |
1 files 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 ) |