Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm loading gtfs into a PostGIS database but I have a problem when loading my stop times.

The data is in time format "00:00:00" and for 1:30 AM, my data is "25:30:00".

I'd like to keep it that way because usually, night buses services start before midnight so I can keep track of the schedule by time, but PostgreSQL doesn't accept time after 24:00:00.

I could modify my script (python) so when it comes to treating stop_times.txt, to modify the time to create something like 2530 so I'll have to deal with integer, but I'm not the only one that will have to deal with that db and my colleague would really prefer to deal with time instead of integers...

Does anyone could think of a way to "bypass" this limitation?


share|improve this question
up vote 5 down vote accepted

You could have two columns: one with a proper time stamp where 25:30 is converted to 1:30 and one with a text '25:30' or integer if that's easier to work with for you.

share|improve this answer
For now, I'll work with an integer field (like 2530) and I'll leave my colleague to deal with converting himself a 25:30:00 string... ;) Thanks Anita! – fgcartographix Aug 27 '12 at 12:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.