diff options
Diffstat (limited to 'lib/Travel/Status/DE/EFA/Stop.pm')
-rw-r--r-- | lib/Travel/Status/DE/EFA/Stop.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/EFA/Stop.pm b/lib/Travel/Status/DE/EFA/Stop.pm index b97cd18..4d7fbe9 100644 --- a/lib/Travel/Status/DE/EFA/Stop.pm +++ b/lib/Travel/Status/DE/EFA/Stop.pm @@ -30,7 +30,15 @@ sub new { sub TO_JSON { my ($self) = @_; - return { %{$self} }; + my $ret = { %{$self} }; + + for my $k (qw(sched_arr rt_arr arr sched_dep rt_dep dep)) { + if ( $ret->{$k} ) { + $ret->{$k} = $ret->{$k}->epoch; + } + } + + return $ret; } 1; |