Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[doc] Timezone and daylight saving time precisions #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

prhod
Copy link
Contributor

@prhod prhod commented Apr 7, 2022

This PR is adding precisions on timezone aware NTFS and daylight saving time handling in stop_times.

daylight_saving.md Outdated Show resolved Hide resolved
daylight_saving.md Outdated Show resolved Hide resolved
daylight_saving.md Outdated Show resolved Hide resolved
daylight_saving.md Show resolved Hide resolved
daylight_saving.md Outdated Show resolved Hide resolved
daylight_saving.md Outdated Show resolved Hide resolved
daylight_saving.md Outdated Show resolved Hide resolved
daylight_saving.md Outdated Show resolved Hide resolved
ntfs_fr.md Show resolved Hide resolved
@stifoon stifoon requested a review from pbench April 15, 2022 07:11

The `network_timezone` field in file networks.txt sets the time zone for all `stop_times` of a `trip` in the `network`.

If a feed covers multiple time zones, a specific time zone information can be specified on a `stop_point` in the `stop_timezone` field. Set this optional field in file `stops.txt` (for stops with location_type = 0). If not set, the timezone of the network is used. Ensure that trip travel times remain accurate and consistent by providing departure and arrival times based on the `network_timezone` for stops that are out of that timezone.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the stop_timezone field is not used at all inside kraken/loki.
We always use the network_timezone for all stop_times of a vehicle journey.

Note that allowing different timezone on each stop_time would make it harder to check if the stop_times are increasing along a trip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This chapter tries to describe the actual (kraken) way of dealing with TZ, and seems to be similar to what you are saying. Maybe the text is not clear enough?

- NTFS uses the local timezone at noon of the travel day of the trip, following the same rule as (GTFS Time data format)[http://gtfs.org/schedule/reference/#field-types]:
> Time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. \
Example: 14:30:00 for 2:30PM or 25:35:00 for 1:35AM on the next day.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be great to have a documented upper bound

Suggested change
The maximum accepted value is 48:00:00

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, there are some trains that runs more than 2 days. Is limit of 48:00 a technical limit ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants