NeTEx-CEN / NeTEx

NeTEx is a CEN Technical Standard for exchanging Public Transport schedules and related data.
http://netex-cen.eu
GNU General Public License v3.0
79 stars 39 forks source link

Time representation for daylight savings time changes #86

Closed piotrek-toolla closed 2 years ago

piotrek-toolla commented 4 years ago

In the GTFS format time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur), and values like 26:30:00 are valid, and no changes are to be made to the daylight savings time changes.

In the NeTEx format time (i.e. DepartureTime or ArrivalTime) are of type xs:time but can also include DayOffset. So a GTFS arrival time value 26:30:00 can be represented with

<ArrivalTime>02:30:00</ArrivalTime>
<ArrivalDayOffset>1</ArrivalDayOffset>

But how can I handle daylight savings time changes? For example for 29th of March, 2020 when clocks move forward from 02:00 am to 03:00 am, do I need to copy all the timetables and shift the times by one hour? Is there any simpler way to do it?

Aurige commented 4 years ago

This information can already be included in the XML/XSD Time and DateTime definition (https://www.w3.org/TR/xmlschema-2/#dateTime). So for NeTEx we just rely on these XML and possibilities.

skinkie commented 4 years ago

@Aurige this is not the answer that @piotrek-toolla is looking for. @piotrek-toolla in public transport (and GTFS) we expect that the operational day will always be in the same timezone. This can be achieved using UTC times, or by keeping the times within the operational day.

In the case of your example you don't change anything in your schedule. Just use the times like you would do for the night before or the night after. The software that is used to display the data will 'transform' the 2am to 3am at time of display.

ue71603 commented 2 years ago

UTC can be modeled with the appended Z 13:15:00Z

ue71603 commented 2 years ago

@Aurige do we need to update a document or can we close this issue?

Aurige commented 2 years ago

I think you can close it