关于Google Tasks API中due参数忽略时间戳时间部分的技术问询:文档是否过时?为何无法编程设置任务时间?
1. Is the API documentation outdated?
Nope, that documentation is still accurate as of 2024. The Google Tasks API v1 has never supported reading or writing the time component of a task's due date—any timestamp you send with a time portion will have that part discarded, and the API only returns the date when you fetch tasks.
2. What's the reasoning behind this design?
From what we can gather, this ties back to the original positioning of Google Tasks as a lightweight, date-focused task manager, meant to complement rather than compete with Google Calendar (which handles precise time scheduling). Early iterations of Tasks were built around day-level organization, and the API was designed to reflect that core use case. There's also a possibility of historical technical debt—updating the API to support time would require changes to backend storage, data models, and maintaining backward compatibility for existing integrations, which Google might not have prioritized given Tasks' niche compared to Calendar.
3. Why can't the API do what the mobile/web apps can?
This is a classic case of client-side vs. API functionality mismatch. While the mobile and web UIs let you set a due time, that time isn't actually stored or exposed via the official Tasks API. From user observations, the apps likely handle the time locally or sync it with a hidden associated Google Calendar event (without exposing that connection via the Tasks API). Essentially, the client experience is enhanced for user convenience, but the underlying API hasn't been updated to surface that time data. It's frustrating, but it's a gap that Google hasn't addressed in years.
内容的提问来源于stack exchange,提问作者devilteo911

