Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks!!

share|improve this question
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.