diff options
| -rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 7c92664..38df763 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -691,6 +691,12 @@ sub get {  			$ref->{checkout}      = epoch_to_dt( $ref->{checkout_ts} );  			$ref->{sched_arrival} = epoch_to_dt( $ref->{sched_arr_ts} );  			$ref->{rt_arrival}    = epoch_to_dt( $ref->{rt_arr_ts} ); +			if ( $ref->{rt_dep_ts} and $ref->{sched_dep_ts} ) { +				$ref->{delay_dep} = $ref->{rt_dep_ts} - $ref->{sched_dep_ts}; +			} +			if ( $ref->{rt_arr_ts} and $ref->{sched_arr_ts} ) { +				$ref->{delay_arr} = $ref->{rt_arr_ts} - $ref->{sched_arr_ts}; +			}  		}  		if ( $opt{with_route_datetime} ) {  			for my $stop ( @{ $ref->{route} } ) { | 
