Open HackMasterFlash opened 4 years ago
I'm having the same issue.
I'll try to get this resolved today. I think MM changed the way they handle time zones.
I'm actually trying to figure it out now. The problem happens when you convert item.due.date returns 2020-03-23 but dueDateTime returns Sun Mar 22 2020 20:00:00 GMT-0400 (EDT)
dueDateTime is the result of var dueDateTime = new Date(item.due.date);
I am having the same issue.
I'll chime in - I'm seeing the same issue. I'm expecting to see today's tasks (and my overdue's), but instead I'm seeing today's and tomorrow's, with today's showing as "yesterday" and tomorrow's showing as "today." Aligns with what gonzonia mentioned up above. Did any of you manage to figure it out yet?
Or...am I seeing a new occurrence of an already-solved issue?
No, it's still going on. I go in and add a + 1 to the diffDays calculation everytime there's a new update to the module. It's a minor tweak and not worth forking for. I'm not sure why it's even happening.
I am also experiencing this issue. When a add a task for today it shows up in MM as being due yesterday.
@gonzonia -- where at exactly did you add "+1" to diffDays? Was it under the "if (self.config.displayTasksWithinDays..." statement or under the "autoDueDateCell" function?
In MMM-Todoist.js I changes line 457 to
var diffDays = Math.floor((dueDate - today + 7200000) / (oneDay))+1;
I have an open pull request that will fix this, I believe. The issue is that tasks with only a due day are relative to UTC time, whereas tasks with a due day and time are (correctly) interpreted relative to your local timezone.
This resolved the floating timezone issue but if the timezone is chosen in Todoist (i.e. not the floating default), due times are now off.
@deyawper, you are right. I forgot to take into account set timezones. Looks like Todoist returns due dates with timezones set as UTC in zulu format. I made another pull request to take this into account.
My raspberry pi has the timezone set for New York and displays time correctly. I have my ToDoist account in the same time zone. But the MM module is showing list items with the incorrect due date. Example an item due on 3/20 (today) is saying it was due yesterday. Is this a UTC issue?