summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS/Result.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/IRIS/Result.pm')
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index c262e71..85fcacb 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -799,8 +799,19 @@ sub TO_JSON {
my %copy = %{$self};
delete $copy{arrival_wings};
delete $copy{departure_wings};
+ delete $copy{realtime_xml};
delete $copy{replaced_by};
delete $copy{replacement_for};
+ delete $copy{strptime_obj};
+ delete $copy{wing_of};
+
+ for my $datetime_key (
+ qw(arrival departure sched_arrival sched_departure start datetime))
+ {
+ if ( defined $copy{$datetime_key} ) {
+ $copy{$datetime_key} = $copy{$datetime_key}->epoch;
+ }
+ }
return {%copy};
}