GTFS datetimes with hours >= 24 are not strictly valid datetimes. They're more like a date plus an interval value - this is the approach I use when I load GTFS data into databases. I'd consider separating the date part from the time part of the arrival/departure times, and then parsing the time part into a "seconds from midnight" value.
Just an idea. If you add a date (YYYYmmdd) to the time string as prefix after formatting the time string, you can calculate interval between two datetime values correctly. For example, add "20180101" if the formatted time is greater than "040000", "20180102" otherwise.

Thanks the suggestions. I did a combination of these two approaches. The times are already split because they are a general trip record for any date. I used a test filter to split into three types: today, span_midnight, tomorrow. Today was left alone, tomorrow were split, 24 subtracted from the hour part and then the h,m,s reassembled into a string. Span_midnight were parsed like tomorrow and a dummy date added to each one, one day apart. Then the new time interval arithmetic gave me the duration in minutes. Since it is only the 'night buses' that are a problem there were only 700 out of the million so the extra processing was trivial.