Loading lib/Travel/Status/DE/HAFAS.pm +24 −10 Original line number Diff line number Diff line Loading @@ -863,6 +863,7 @@ sub parse_board { my @jnyL = @{ $self->{raw_json}{svcResL}[0]{res}{jnyL} // [] }; for my $result (@jnyL) { eval { push( @{ $self->{results} }, Travel::Status::DE::HAFAS::Journey->new( Loading @@ -873,6 +874,19 @@ sub parse_board { hafas => $self, ) ); }; if ($@) { if ( $@ =~ m{Invalid local time for date in time zone} ) { # Yes, HAFAS does in fact return invalid times during DST change # (as in, it returns 02:XX:XX timestamps when the time jumps from 02:00:00 to 03:00:00) # It's not clear what exactly is going wrong where and whether a 2:30 or a 3:30 journey is the correct one. # For now, silently discard the affected journeys. } else { warn("Skipping $result->{jid}: $@"); } } } return $self; } Loading Loading
lib/Travel/Status/DE/HAFAS.pm +24 −10 Original line number Diff line number Diff line Loading @@ -863,6 +863,7 @@ sub parse_board { my @jnyL = @{ $self->{raw_json}{svcResL}[0]{res}{jnyL} // [] }; for my $result (@jnyL) { eval { push( @{ $self->{results} }, Travel::Status::DE::HAFAS::Journey->new( Loading @@ -873,6 +874,19 @@ sub parse_board { hafas => $self, ) ); }; if ($@) { if ( $@ =~ m{Invalid local time for date in time zone} ) { # Yes, HAFAS does in fact return invalid times during DST change # (as in, it returns 02:XX:XX timestamps when the time jumps from 02:00:00 to 03:00:00) # It's not clear what exactly is going wrong where and whether a 2:30 or a 3:30 journey is the correct one. # For now, silently discard the affected journeys. } else { warn("Skipping $result->{jid}: $@"); } } } return $self; } Loading