From ac3d3d1e6acb3568f3d059f073ae68e1274fdaf7 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 2 Apr 2024 16:43:10 +0200 Subject: store tz offset as documented --- lib/Travel/Status/DE/HAFAS/Stop.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Travel/Status/DE/HAFAS/Stop.pm b/lib/Travel/Status/DE/HAFAS/Stop.pm index cb17653..0a1f44f 100644 --- a/lib/Travel/Status/DE/HAFAS/Stop.pm +++ b/lib/Travel/Status/DE/HAFAS/Stop.pm @@ -166,8 +166,8 @@ sub handle_day_change { } if ( defined $offset and $offset != $timestr->offset / 60 ) { - $self->{tz_offset} = $timestr->offset / 60 - $offset; - $timestr->add( minutes => $self->{tz_offset} ); + $self->{tz_offset} = $offset - $timestr->offset / 60; + $timestr->subtract( minutes => $self->{tz_offset} ); } return $timestr; -- cgit v1.2.3