Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

todoist not being able to parse timestamp #645

Closed
massawho opened this issue Sep 21, 2019 · 5 comments
Closed

todoist not being able to parse timestamp #645

massawho opened this issue Sep 21, 2019 · 5 comments
Labels
🐛 bug "Houston, we've had a problem."

Comments

@massawho
Copy link

massawho commented Sep 21, 2019

What's broken?

Todoist shows messsage parsing time "2019-09-30T14:00:00Z" as "2006-01-02T15:04:05+00:00": cannot parse "Z" as "+00:00" for tasks that were imported from GCal.

I have created a new account in todoist and synchronised my todoist with GCal. Since my tasks were first created in GCal, they got exported to todoist and now my wtfutil mod shows that message and cannot display any of the tasks.

Edit:
Apparently any task I create in todoist with time, regardless if it's floating time or timezoned, it gives me the same error

@senorprogrammer senorprogrammer added the 🐛 bug "Houston, we've had a problem." label Sep 21, 2019
@senorprogrammer
Copy link
Collaborator

Confirmed. Attaching a date works fine. Attaching a time causes the error.

@massawho
Copy link
Author

Is there any plan to start working on a fix for this? If not, I will submit a PR if that's ok :)

@senorprogrammer
Copy link
Collaborator

It's all yours, please do. The code in question is over here: https://github.com/wtfutil/todoist/blob/97395e581a76cbb647a0c7b26debebc0456a6f44/todoist.go#L59

I think we'll want to support both the existing format and the affected format.

massawho added a commit to massawho/todoist that referenced this issue Oct 9, 2019
The json from the api returns a date format like "2019-10-07T14:00:00Z"
and this makes the code to panic. This is because the CustomDate is
expecting a timestamp with the format "2006-01-02T15:04:05+00:00".

wtfutil/wtf#645
massawho added a commit to massawho/todoist that referenced this issue Oct 9, 2019
The json from the api returns a date format like "2019-10-07T14:00:00Z"
and this makes the code to panic. This is because the CustomDate is
expecting a timestamp with the format "2006-01-02T15:04:05+00:00".

wtfutil/wtf#645
@massawho
Copy link
Author

massawho commented Oct 9, 2019

Here we go :)
#hacktoberfest
wtfutil/todoist#1

massawho added a commit to massawho/todoist that referenced this issue Oct 9, 2019
The json from the api returns a date format like "2019-10-07T14:00:00Z"
and this makes the code to panic. This is because the CustomDate is
expecting a timestamp with the format "2006-01-02T15:04:05+00:00".

wtfutil/wtf#645
@senorprogrammer
Copy link
Collaborator

Fixed by wtfutil/todoist#1

massawho added a commit to massawho/todoist that referenced this issue Oct 11, 2019
The json from the api returns a date format like "2019-10-07T14:00:00Z"
and this makes the code to panic. This is because the CustomDate is
expecting a timestamp with the format "2006-01-02T15:04:05+00:00".

wtfutil/wtf#645
massawho added a commit to massawho/todoist that referenced this issue Oct 11, 2019
The json from the api returns a date format like "2019-10-07T14:00:00Z"
and this makes the code to panic. This is because the CustomDate is
expecting a timestamp with the format "2006-01-02T15:04:05+00:00".

wtfutil/wtf#645
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug "Houston, we've had a problem."
Development

No branches or pull requests

2 participants