Skip to content

Daylight Saving Time and NeTEx (Nordic profile) #5109

@t2gran

Description

@t2gran

Summary

OTP should parse and map NeTEx TimetabledPassingTime according to the profile when going from Wintertime to Summertime and back. The spec does not follow the GTFS specification for trip times, but OTP treat them the same way.

The NeTEx nordic profile description is here: https://enturas.atlassian.net/wiki/spaces/PUBLIC/pages/728563782/General+information+NeTEx#PassingTimes-when-switching-to-and-from-Daylight-Savings-Time

From StopTimesMapper(line 241):
private StopTime mapToStopTime(
    Trip trip,
    StopPointInJourneyPattern stopPoint,
    StopLocation stop,
    TimetabledPassingTime passingTime,
    int stopSequence
  ) {
    StopTime stopTime = new StopTime();
    stopTime.setTrip(trip);
    stopTime.setStopSequence(stopSequence);
    stopTime.setStop(stop);
    if (passingTime.getArrivalTime() != null || passingTime.getDepartureTime() != null) {
      stopTime.setArrivalTime(
        calculateOtpTime(
          passingTime.getArrivalTime(),
          passingTime.getArrivalDayOffset(),
          passingTime.getDepartureTime(),
          passingTime.getDepartureDayOffset()
        )
      );

We do not pass in the time-zone/time-offset information and the times are treated as local-time.

Details

  • Since OTP is using the GTFS way for the internal model, the Netex time-table must be converted into this model.
  • Extra trips for the extra hour in the fall when going from summer time to winter time must be added.
  • Trips in the "removed" hour in spring when going from winter time to summer time must be removed.

For GTFS all trip-times for a given service-day/operation-day is defined in the time-zone of the local-date at NOON (not midnight). For NeTEx Nordic profile the first departure time of the trip define the time-zone to use.

Version of OTP used (exact commit hash or JAR name)

Current dev-2.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    !BugApply to issues describing a bug and PRs witch fixes it.+NeTExThis issue is related to the Netex model/import.EnturOn Entur RoadmapStaleThis issue is stale, no activity for 90 days. Remove stale label or comment within 30 days.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions