From 38071ce2ad25189ef7bbe14508e3d23e5a913001 Mon Sep 17 00:00:00 2001 From: Derf Null Date: Mon, 1 May 2023 11:19:40 +0200 Subject: treat delays as integers. what the fuck. --- lib/Travel/Status/DE/HAFAS/Journey.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Travel') diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index 512da5f..7fa9014 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -121,12 +121,12 @@ sub new { my $arr_delay = ( $sched_arr and $rt_arr ) - ? ( $rt_arr->epoch - $sched_arr->epoch ) / 60 + ? 0 + ( $rt_arr->epoch - $sched_arr->epoch ) / 60 : undef; my $dep_delay = ( $sched_dep and $rt_dep ) - ? ( $rt_dep->epoch - $sched_dep->epoch ) / 60 + ? 0 + ( $rt_dep->epoch - $sched_dep->epoch ) / 60 : undef; my $arr_cancelled = $stop->{aCncl}; -- cgit v1.2.3