grote/osm2gtfs

TypeError comparing dates

Closed this issue · 1 comments

If the json config file includes in the feed info only one of the dates: "start_date" or "end_date" then the other is generated automatically. But when this happen the object type for the generated date is datetime.date and the type of the date from config file is datetime.datetime. When the dates validation is done an TypeError occurs: «can't compare datetime.datetime to datetime.date»

This could be fixed using datetime.datetime in both cases. I'll create a PR is you agree.

grote commented

I am not too familiar with that code, but what you describe does sound like a bug to me.

Fenix uses completely automatic dates, so it seems not to be affected by that.