You bring up some very good points about the DST transition. Looking at a few feeds in the USA (BART, Caltrain, San Diego, TriMet) I can't find anyone that has special service keys that run only the transition days in 2009 (begins on March 8 and ends on November 1). As Chas says SFMTA doesn't handle it specially. Are any GTFS producers correctly handling DST transitions according to seconds since midnight?
So why hasn't Google's trip planner returned trips off by one hour 2 days a year? Because when surrounded by time handling code someone had the good idea to interpret the HH:MM:SS in stop_times as seconds past 12h before midnight. In other words all stop times on transition days are treated as being in the new offset. This is convenient because most trips are scheduled at local times after the DST transition and don't need to be duplicated. Unlike adding special entries to the calendar files this interpretation doesn't require the data producer to pay attention to when the DST transition happens, except for the few trips scheduled at local times before the transition.
The problem is that we didn't go back and put this in the specification. So what are our options, as the community responsible for gtfs?
1) Leave spec is and require correct feeds to duplicate trips on transition days
2) Add new exceptions to service_id,date pairs which say that on these dates add or subtract one hour from stop_times. require correct feeds to add these exceptions to their data
3a) Continue interpreting stop_times as "seconds since midnight" unless a new exception marks a service as using "seconds since noon - 12h"
3b) Change specification to interpret all stop_times as "seconds since noon - 12h", breaking backwards compatibility.
3c) Change specification to interpret all stop_times as "seconds since noon - 12h", breaking backwards compatibility. Add new flag to force a particular service_id to use the old interpretation "seconds since midnight"
Assuming that most data today doesn't handle DST transitions (1,2,3a) require widespread changes which isn't very attractive. I think we should change the specification to document what is done in practice: stop_times values don't change on DST transition days for daytime service. The gtfs-changes welcome message says "Changes to the spec should be backwards-compatible. When adding features to the specification, we want to avoid making changes that will make existing feeds invalid." While this is a backwards incompatible change I think it actually makes existing feeds valid.
Details
[mostly based on DST leaps in the USA (spring 01:59:59 to 03:00:00; fall 01:59:59 to 01:00:00)]
Feed producers who assume the HH:MM:SS are equivalent to local times are currently incorrect according to "s since midnight" for service days with a DST transition by one hour after the leap forward or backward, which is most of the day. Changing GTFS to "s since noon - 12h" will mean they are incorrect before the leap, a few hours in the night.
Feed producers who correctly produce HH:MM:SS as "s since midnight" will need to change the times forward or back an hour on transition days or move the service to the previous day and add 24h to the times. In the unlikely event that this is really hard we could offer a new flag to these services (3c).
Here is a little table of examples during transitions in the USA. Note that "s since midnight" is different from local time during most of transition days and times from the previous day are the same under "s since midnight" and "s since noon - 12h" interpretations.
s since midnight local time
calendar s since noon - 12h
2009-03-08 00:00 01:00 0:00
2009-03-08 02:00 03:00 3:00
2009-03-08 07:00 08:00 8:00
2009-10-31 24:00 24:00 24:00
2009-11-01 00:00 * 0:00
2009-10-31 25:30 25:30 1:30 (1st 1:30)
2009-11-01 01:30 00:30 1:30 (1st 1:30)
2009-10-31 26:30 26:30 1:30 (2nd 1:30)
2009-11-01 02:30 01:30 1:30 (2nd 1:30)
2009-10-31 27:00 27:00 2:00
2009-11-01 03:00 02:00 2:00
2009-11-01 09:00 08:00 8:00
* can't represented on 2009-11-01 and needs to be moved to 2009-10-31