Unverified Commit df17fc50 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Journey(3pm), Stop(3pm): Document time zone handling

parent aba8e771
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -411,7 +411,9 @@ a station-specific arrival/departure obtained by a stationboard query, or a
train journey that does not belong to a specific station.

stationboard-specific accessors are annotated with "(station only)" and return
undef for non-station journeys.
undef for non-station journeys. All date and time entries refer to the
backend time zone (Europe/Berlin in most cases) and do not take local time
into account; see B<tz_offset> for the latter.

=head1 METHODS

@@ -481,10 +483,10 @@ 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).
Offset between backend time zone (default: Europe/Berlin) and this journey's
time zone in minutes, if any. For instance, if the backend uses UTC+2 (CEST)
and the journey uses UTC+1 (IST), tz_offset is -60. Returns undef if both use
the same time zone (or rather, the same UTC offset).

=item $journey->delay (station only)

+8 −4
Original line number Diff line number Diff line
@@ -227,6 +227,10 @@ Travel::Status::DE::HAFAS::Journey(3pm)'s stop at a given
Travel::Status::DE::HAFAS::Location(3pm) with arrival/departure time,
platform, etc.

All date and time entries refer to the backend time zone (Europe/Berlin in most
cases) and do not take local time into account; see B<tz_offset> for the
latter.

=head1 METHODS

=head2 ACCESSORS
@@ -280,10 +284,10 @@ Departure is cancelled.

=item $stop->tz_offset

Offset between the backend's time zone (default: Europe/Berlin) and this stop's
time zone in minutes, if any. For instance, if the backend is currently in UTC+2
(CEST) and the stop is in UTC+1 (IST), tz_offset is -60. undef if both are in
the same time zone (or rather, the same UTC offset).
Offset between backend time zone (default: Europe/Berlin) and this stop's time
zone in minutes, if any. For instance, if the backend uses UTC+2 (CEST) and the
stop uses UTC+1 (IST), tz_offset is -60. Returns undef if both use the same
time zone (or rather, the same UTC offset).

=item $stop->delay