Unverified Commit 6cbd9c67 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Journey: use _dt suffix for with_route_datetime keys

parent 15355cc1
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -704,7 +704,7 @@ sub get {
			for my $stop ( @{ $ref->{route} } ) {
				for my $k (qw(rt_arr rt_dep sched_arr sched_dep)) {
					if ( $stop->[2]{$k} ) {
						$stop->[2]{$k} = epoch_to_dt( $stop->[2]{$k} );
						$stop->[2]{"${k}_dt"} = epoch_to_dt( $stop->[2]{$k} );
					}
				}
			}
@@ -1265,8 +1265,7 @@ sub get_travel_distance {
		(
			( $_->[1] and $_->[1] == $from_eva or $_->[0] eq $from )
			  and ( not( defined $_->[2]{sched_dep} or defined $_->[2]{rt_dep} )
				or ( $_->[2]{sched_dep} // $_->[2]{rt_dep} )->epoch
				== $from_ts )
				or ( $_->[2]{sched_dep} // $_->[2]{rt_dep} ) == $from_ts )
		)
	}
	@{$route_ref};
@@ -1274,7 +1273,7 @@ sub get_travel_distance {
		(
			( $_->[1] and $_->[1] == $to_eva or $_->[0] eq $to )
			  and ( not( defined $_->[2]{sched_arr} or defined $_->[2]{rt_arr} )
				or ( $_->[2]{sched_arr} // $_->[2]{rt_arr} )->epoch == $to_ts )
				or ( $_->[2]{sched_arr} // $_->[2]{rt_arr} ) == $to_ts )
		)
	}
	@route;
+2 −2
Original line number Diff line number Diff line
@@ -269,10 +269,10 @@
							% }
							<span style="color: #808080;">
								% if ($before and $station->[2]{sched_dep}) {
									%= $station->[2]{sched_dep}->strftime('%H:%M')
									%= $station->[2]{sched_dep_dt}->strftime('%H:%M')
								% }
								% elsif (not $before and $station->[2]{sched_arr}) {
									%= $station->[2]{sched_arr}->strftime('%H:%M')
									%= $station->[2]{sched_arr_dt}->strftime('%H:%M')
								% }
							</span>
							% if ($at_startstop or $within) {