summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/HAFAS/Journey.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/HAFAS/Journey.pm')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Journey.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm
index 223dc13..ed66cdd 100644
--- a/lib/Travel/Status/DE/HAFAS/Journey.pm
+++ b/lib/Travel/Status/DE/HAFAS/Journey.pm
@@ -14,7 +14,7 @@ use Travel::Status::DE::HAFAS::Stop;
our $VERSION = '5.06';
Travel::Status::DE::HAFAS::Journey->mk_ro_accessors(
- qw(datetime sched_datetime rt_datetime
+ qw(datetime sched_datetime rt_datetime tz_offset
is_additional is_cancelled is_partially_cancelled
station station_eva platform sched_platform rt_platform operator
product
@@ -185,6 +185,7 @@ sub new {
}
$timestr = Travel::Status::DE::HAFAS::Stop::handle_day_change(
+ $journey,
input => $timestr,
date => $date,
strp_obj => $hafas->{strptime_obj},
@@ -473,6 +474,13 @@ DateTime object indicating the arrival/departure date and time.
Real-time data if available, schedule data otherwise.
undef if neither is available.
+=item $journey->tz_offset
+
+Offset between the backend's time zone (default: Europe/Berlin) and this
+journey's time zone in minutes, if any. For instance, if the backend is
+currently in UTC+2 (CEST) and the journey is in UTC+1 (IST), tz_offset is -60.
+undef if both are in the same time zone (or rather, the same UTC offset).
+
=item $journey->delay (station only)
Delay in minutes, or undef if it is unknown.