From f7e48adf5ebbefc4365ade100b5c8b4434f2bd24 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 29 Jun 2025 05:52:32 +0200 Subject: history: do not show delays < 1 minute --- templates/_history_trains.html.ep | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep index 04efda6..6631f56 100644 --- a/templates/_history_trains.html.ep +++ b/templates/_history_trains.html.ep @@ -37,8 +37,8 @@ timer_off % } else { %= $travel->{rt_arrival}->strftime('%H:%M'); - % if ($travel->{sched_arrival} != $travel->{rt_arrival}) { - (<%= sprintf('%+d', ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60) %>) + % if ($travel->{delay_arr} and int($travel->{delay_arr} / 60)) { + (<%= sprintf('%+d', $travel->{delay_arr} / 60) %>) % } % } % } @@ -55,8 +55,8 @@ % } % else { <%= $travel->{rt_departure}->strftime('%H:%M') %> - % if ($travel->{sched_departure} != $travel->{rt_departure}) { - (<%= sprintf('%+d', ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60) %>) + % if ($travel->{delay_dep} and int($travel->{delay_dep} / 60)) { + (<%= sprintf('%+d', $travel->{delay_dep} / 60) %>) % } % } <%= $travel->{from_name} %> -- cgit v1.2.3