Fix parsing of due dates with time

Now it works for both due dates without time (2016-12-16) and (2016-12-01T12:00:00)
pull/25/head
Rocco Mathijn Andela 2022-07-12 16:53:38 +02:00 committed by GitHub
parent 67935a5b0c
commit 1bc64e03d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -860,8 +860,7 @@ def autodoist_magic(args, api, label_id, regen_labels_id):
try:
item_due_date = item['due']['date']
item_due_date = datetime.strptime(
item_due_date, '%Y-%m-%d')
item_due_date = datetime.fromisoformat(item_due_date)
except:
logging.warning(
'No due date to determine start date for item: "%s".', item['content'])