use python3.7 builtin function to properly parse iso8601
This commit is contained in:
parent
4190279e8b
commit
31db1ad426
|
@ -122,7 +122,7 @@ def events(scheduleUrl, titlemap={}):
|
|||
|
||||
if __name__ == "__main__":
|
||||
events = list(events(scheduleUrl))
|
||||
events = sorted(events, key=lambda x: datetime.datetime.strptime(x["datetime"], "%Y-%m-%dT%H:%M:%S%z"))
|
||||
events = sorted(events, key=lambda x: datetime.datetime.fromisoformat(x["datetime"]))
|
||||
|
||||
with open("fahrplan.json", "w") as f:
|
||||
json.dump(events, f)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
lxml
|
Loading…
Reference in New Issue