summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/EFA/Departure.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/EFA/Departure.pm')
-rw-r--r--lib/Travel/Status/DE/EFA/Departure.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/EFA/Departure.pm b/lib/Travel/Status/DE/EFA/Departure.pm
index 703b29c..3ad68a5 100644
--- a/lib/Travel/Status/DE/EFA/Departure.pm
+++ b/lib/Travel/Status/DE/EFA/Departure.pm
@@ -246,7 +246,18 @@ sub route_interesting {
sub TO_JSON {
my ($self) = @_;
- return { %{$self} };
+ my $ret = { %{$self} };
+
+ delete $ret->{strp_stopseq};
+ delete $ret->{strp_stopseq_s};
+
+ for my $k (qw(datetime rt_datetime sched_datetime)) {
+ if ( $ret->{$k} ) {
+ $ret->{$k} = $ret->{$k}->epoch;
+ }
+ }
+
+ return $ret;
}
1;