diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-29 05:52:32 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-29 05:52:32 +0200 |
commit | f7e48adf5ebbefc4365ade100b5c8b4434f2bd24 (patch) | |
tree | 55644c384639a106a8fcdbb7ceacf7212791a99f | |
parent | fc7ff5b6d7d285e1962e46c7ddbf304ebc7f1aa7 (diff) |
history: do not show delays < 1 minute2.15.1
-rw-r--r-- | templates/_history_trains.html.ep | 8 |
1 files 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 @@ <i class="material-icons">timer_off</i> % } 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) %>) % } % } <strong><%= $travel->{from_name} %></strong> |