Google 任务 API 补丁覆盖时间部分

问题描述

我正在尝试使用补丁作为来自 API https://developers.google.com/tasks/reference/rest/v1/tasks/patch 的 google 任务的更新选项。据我所知,它应该只更新发送的字段,但即使我只发送标题,它也会覆盖时间部分,这意味着:我从谷歌任务应用程序添加谷歌任务,设置日期和时间;然后在我的应用程序中使用 https://developers.google.com/tasks/reference/rest/v1/tasks/patch 我正在发送标题更新,任务变成一整天并且失去时间部分

我做错了什么?

解决方法

这是一个已报告的问题

Support documentation 表示您可以在 Google 问题跟踪器上报告此问题。在这种情况下,我会找到为此创建的报告并对其进行投票。

正如您所提到的,Google Tasks documentation 表示如果您没有明确更改该字段,则该字段 due 不应受到影响 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.