From fb0d8fc6083ba6f34934d38ff58fa069c7f02a85 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 3 Apr 2024 14:54:13 +0200 Subject: also show local time for current stop --- lib/DBInfoscreen/Controller/Stationboard.pm | 6 +++++- templates/_train_details.html.ep | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 60a15d5..57de335 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -1243,7 +1243,11 @@ sub train_details { = $station_info->{dep_cancelled}; $res->{is_cancelled} = $res->{arrival_is_cancelled} || $res->{arrival_is_cancelled}; - $res->{platform} = $station_info->{platform}; + $res->{tz_offset} = $station_info->{tz_offset}; + $res->{local_dt_da} = $station_info->{local_dt_da}; + $res->{local_sched_arr} = $station_info->{local_sched_arr}; + $res->{local_sched_dep} = $station_info->{local_sched_dep}; + $res->{platform} = $station_info->{platform}; $res->{scheduled_platform} = $station_info->{sched_platform}; } diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 1437449..35c0aaf 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -44,6 +44,9 @@ % } % elsif ($departure->{prep_time}) { Ein: <%= $departure->{prep_time} %> +% } +% if ($departure->{tz_offset} and $departure->{local_sched_arr}) { +
Lokal: <%= $departure->{local_sched_arr}->strftime('%H:%M') %> % } @@ -106,6 +109,9 @@ % } % elsif ($departure->{sched_departure}) { Ab: <%= $departure->{sched_departure} %> +% } +% if ($departure->{tz_offset} and $departure->{local_sched_dep}) { +
Lokal: <%= $departure->{local_sched_dep}->strftime('%H:%M') %> % } @@ -282,6 +288,9 @@ % } % if ($departure->{missing_realtime} or $departure->{no_realtime_yet}) { gps_off +% } +% if ($departure->{tz_offset} and $departure->{local_dt_da}) { + (lokal <%= $departure->{local_dt_da}->strftime('%H:%M') %>) % } <%= stash('station_name') %> % if (my $u = $departure->{utilization}) { -- cgit v1.2.3