diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-12-29 10:27:27 +0100 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-12-29 10:27:27 +0100 |
| commit | 174b5132a16c3152ea6ab093877d3168a3fbc85b (patch) | |
| tree | fdc852f8850431f88c4a1f3b4755120a17588413 | |
| parent | 9876e7eb805ad4b3314b737a8b7b1a1b824b03fa (diff) | |
connection suggestions: pass correct timestamp to backend2.18.4
$entry->{real_arr} was undef, hence all requests used the current time
instead of the estimated arrival time.
Closes #353
| -rw-r--r-- | lib/Travelynx/Command/work.pm | 23 |
1 files 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 { |
