From 174b5132a16c3152ea6ab093877d3168a3fbc85b Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 29 Dec 2025 10:27:27 +0100 Subject: connection suggestions: pass correct timestamp to backend $entry->{real_arr} was undef, hence all requests used the current time instead of the estimated arrival time. Closes #353 --- lib/Travelynx/Command/work.pm | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index d735def..f3bf71c 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -215,8 +215,11 @@ sub run { exclude => $dep, ); $self->app->dbris->get_connections_p( - station => $arr, - timestamp => $entry->{real_arr}, + station => $arr, + timestamp => DateTime->from_epoch( + epoch => $entry->{real_arr_ts}, + time_zone => 'Europe/Berlin' + ), destinations => \@destinations )->then( sub { @@ -348,9 +351,12 @@ sub run { exclude => $dep, ); $self->app->efa->get_connections_p( - service => $entry->{backend_name}, - name => $arr, - timestamp => $entry->{real_arr}, + service => $entry->{backend_name}, + name => $arr, + timestamp => DateTime->from_epoch( + epoch => $entry->{real_arr_ts}, + time_zone => 'Europe/Berlin' + ), destinations => \@destinations )->then( sub { @@ -794,8 +800,11 @@ sub run { exclude => $dep, ); $self->app->iris->get_connections_p( - station => $arr, - timestamp => $entry->{real_arr}, + station => $arr, + timestamp => DateTime->from_epoch( + epoch => $entry->{real_arr_ts}, + time_zone => 'Europe/Berlin' + ), destinations => \@destinations )->then( sub { -- cgit v1.2.3