NoMoKeTo/pyefa — pull request #3 by bwildenhain (2014-03-30 21:50:57+00:00)
Title: Trains arriving at 24:00 cause problems

Trains arriving at 24:00 caused problems, this fix converts it to 0:00 and changes date accordingly

$ clifa route --from Essen Hbf --to Düsseldorf Hbf -t 22:40
Traceback (most recent call last):
File "/usr/local/bin/clifa", line 9, in
load_entry_point('clifa==0.2.2', 'console_scripts', 'clifa')()
File "/usr/local/lib/python2.7/dist-packages/clifa-0.2.2-py2.7.egg/clifa_launch.py", line 4, in launch
import clifa
File "/usr/local/lib/python2.7/dist-packages/clifa-0.2.2-py2.7.egg/clifa.py", line 245, in
print efa.tripRequest(origin=point_from, destination=point_to, via=point_via, time=time, timetype=timetype, max_interchanges=max_interchanges, select_interchange_by=args.prefer, use_near_stops=args.proximity, train_type=args.include, walk_speed=args.walk_speed, with_bike=args.bike, apitype=args.api)
File "/usr/local/lib/python2.7/dist-packages/pyefa-0.1.3-py2.7.egg/pyefa/triprequest.py", line 124, in tripRequest
result = self.parseTripXML(rawdata, result)
File "/usr/local/lib/python2.7/dist-packages/pyefa-0.1.3-py2.7.egg/pyefa/triprequest.py", line 174, in parseTripXML
newpart.destination = self.parsePointXML(partXML('itdPoint')[1], newpart.destination)
File "/usr/local/lib/python2.7/dist-packages/pyefa-0.1.3-py2.7.egg/pyefa/triprequest.py", line 225, in parsePointXML
if xmldata('itdDateTimeTarget'): times.append(self.parseDateTimeXML(xmldata.itdDateTimeTarget))
File "/usr/local/lib/python2.7/dist-packages/pyefa-0.1.3-py2.7.egg/pyefa/triprequest.py", line 261, in parseDateTimeXML
return datetime.datetime(int(xmldata.itdDate['year']), int(xmldata.itdDate['month']), int(xmldata.itdDate['day']), int(xmldata.itdTime['hour']), int(xmldata.itdTime['minute']))
ValueError: hour must be in 0..23