Create your data feed

agency_timezone

Time zone fields specify the time zone for the transit agency and stops.

Agency Timezone

The agency_timezone field in file agency.txt sets the time zone for your transit agency. This required field also serves as a reference for the departure and arrival times shown in your GTFS feed. All agencies in a feed must have the same agency_timezone.

Stop Timezone

If a feed covers multiple time zones, provide time zone information for stops outside the agency_timezone in the stop_timezone field. Set this optional field in file stops.txt. If you omit stop_timezone, our system assumes that the stop is located in the timezone specified by field agency_timezone in the agency.txt file. Ensure that trip travel times remain accurate and consistent by providing departure and arrival times based on the agency_timezone for stops that are out of that timezone.

Routing results show calculated departure and arrival times in the local time zone of each stop.

Daylight Saving Time

Important: Time in stops.txt should always increase.

Some trips may operate during the switch from or to Daylight Saving time and then continue to operate as normal. Model these trips to the previous day as the point of reference in stop_times.txt. Make the departure times consistent with vehicle travel time. Our algorithm automatically calculates correct times for user display.

If services follow a special schedule during the switch from or to Daylight Saving time (for example, wait for an hour at one stop), disable normal trips for this date. Model this trip as an additional, exceptional trip.

Examples

The clock switches forward

A bus starts on October 2 at 1:50 AM the night the switch happens (for example, 2 AM changes to 3 AM). The trip is modeled as belonging to the previous day (October 1):

stop_sequence Departure_times
[GTFS]
Displayed departure time
[Google Maps]
1 25:50:00 (October 1) 01:50 AM (October 2)
2 26:10:00 (October 1) 03:10 AM (October 2) *
3 27:10:00 (October 1) 04:10 AM (October 2)
4 28:10:00 (October 1) 05:10 AM (October 2)

* displays due to time change

The clock switches backwards

A bus starts on October 2 at 1:50 AM the night the switch happens (for example, 3 AM changes to 2 AM). The trip is modeled as belonging to the previous day (October 1):

stop_sequence Departure_times
[GTFS]
Displayed departure time
[Google Maps]
1 25:50:00 (October 1) 01:50 AM (October 2)
2 26:10:00 (October 1) 02:10 AM (October 2) **
3 27:10:00 (October 1) 02:10 AM (October 2) ***
4 28:10:00 (October 1) 03:10 AM (October 2)

** displays before the actual time switch
*** displays after the actual time switch

Time-related validation warnings

Feed validation may return warnings on time field settings.

Fast Travel Between Stops

Fast travel warnings are caused when the computed velocity of a trip is higher than the maximum velocity defined for that route_type.

If times in stop_times.txt are provided in the local time of the corresponding stop and not in the time defined in agency_timezone, the system may return a Fast Travel warning. More importantly, the system will return incorrect routing results. The routing algorithm assumes that times in stop_times.txt are provided in the time zone defined in agency_timezone.

Fix this situation by defining stop times in stop_times.txt that use the time zone defined in agency_timezone.

Even if you set stop_timezone values in stops.txt, it is best practice to specify times in stop_times.txt as time since midnight in the timezone specified by agency_timezone in agency.txt. This setting ensures that the time values in a trip always increase over the course of a trip, regardless of which timezones the trip crosses. Also, note that times in stop_times.txt should always be provided in the time defined in agency_timezone (NOT the local time of the corresponding stop).

This warning normally indicates a data problem. Check for the following:

  • stop locations: a stop too far away from the correct location would trigger this warning.
  • Stop times are accurate.
  • If the warning is due to daylight saving changes, refer to Daylight Saving Time above for details.
Was this helpful?
How can we improve it?