I\'m storing GTFS feeds into a SQL database and some times are expected to be stored above the 24:00:00 cap on time values. For example, some trains run at 12:30AM, but are
I'd store two fields:
departure_time timestamp with time zone,
service_date date
Departure time would be calculated like this:
=> select '2015-07-08'::timestamptz+'24:30'::interval;
2015-07-09 00:30:00+02
This way:
Suggest to use int for that... your value could be:
Sec + Min * 60 + Hour * 3600
For the 24:30:00, you will get 88200.
When loading your value from DB, you could reverse your value by simple math equation:
Hour = int(value / 3600)
Min = int(value % 3600 / 60)
Sec = value % 3600 % 1800