Unverified Commit 174b5132 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

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
parent 9876e7eb
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -216,7 +216,10 @@ sub run {
						  );
						$self->app->dbris->get_connections_p(
							station   => $arr,
							timestamp    => $entry->{real_arr},
							timestamp => DateTime->from_epoch(
								epoch     => $entry->{real_arr_ts},
								time_zone => 'Europe/Berlin'
							),
							destinations => \@destinations
						)->then(
							sub {
@@ -350,7 +353,10 @@ sub run {
						$self->app->efa->get_connections_p(
							service   => $entry->{backend_name},
							name      => $arr,
							timestamp    => $entry->{real_arr},
							timestamp => DateTime->from_epoch(
								epoch     => $entry->{real_arr_ts},
								time_zone => 'Europe/Berlin'
							),
							destinations => \@destinations
						)->then(
							sub {
@@ -795,7 +801,10 @@ sub run {
						  );
						$self->app->iris->get_connections_p(
							station   => $arr,
							timestamp    => $entry->{real_arr},
							timestamp => DateTime->from_epoch(
								epoch     => $entry->{real_arr_ts},
								time_zone => 'Europe/Berlin'
							),
							destinations => \@destinations
						)->then(
							sub {