Closed JulienMasson closed 2 years ago
@maikol-solis, @reedspool
This is a first draft to handle the DEADLINE field.
For some reasons, the due field string returned by the API doesn't give min/hour information.
If I set with my phone the deadline of a task: Wed 27 Oct, 12:30
When I fetch, I receive data with hour/min from due
field set to 0.
The year/month/day are correct but hour/min set to 0, I don't know why ...
And if I push a task with DEADLINE: <2021-10-29 Wed 05:30>
, the year/month/day are correctly set but min/hour still 0.
So it's very strange, maybe I need to add an extra data to the request ...
My first impression is that the api is buggy, I will continue my investigation.
According to the API for the due
field:
https://developers.google.com/tasks/reference/rest/v1/tasks#Task
string
Due date of the task (as a RFC 3339 timestamp). Optional. The due date only records date information; the time portion of the timestamp is discarded when setting the due date. It isn't possible to read or write the time that a task is due via the API.
So it looks like this behavior is expected ...
I merge this PR like this.
From the API documentation, there is a field called "due" with the timestamp of the task deadline: https://developers.google.com/tasks/reference/rest/v1/tasks/list
Based on this field we can add a DEADLINE org entry in the corresponding task.
The push is also handled.
fix #13