cbrooker / MMM-Todoist

This is an extension for the MagicMirror2 platform. It will display your Todoist todos on your MagicMirror.
MIT License
151 stars 58 forks source link

Fix due date parsing #78

Closed diego-escalante closed 4 years ago

diego-escalante commented 4 years ago

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.