The Todoist API has two ways of representing due dates:
"2020-06-15" - If your task only has a due day.
"2020-06-15T00:00:00" - if your task has a due day and time.
Passing these seemingly equivalent strings into new Date() produces two different moments in time. See this page for more info. The end result is that tasks with only due days were relative to UTC and tasks with due days and times were relative to the local timezone. Causing strange ordering and filtering behavior, along with wrong due dates in the display.
This PR fixes this bug by parsing date strings appropriately and keeping them all relative to the local timezone.
The Todoist API has two ways of representing due dates:
Passing these seemingly equivalent strings into
new Date()
produces two different moments in time. See this page for more info. The end result is that tasks with only due days were relative to UTC and tasks with due days and times were relative to the local timezone. Causing strange ordering and filtering behavior, along with wrong due dates in the display.This PR fixes this bug by parsing date strings appropriately and keeping them all relative to the local timezone.