microsoft-graph-apimicrosoft-planner

Microsoft planner startDate/dueDate timezone?


The Microsoft planner does not seem to support time for tasks, i.e. does not have any way to specify the time:

![enter image description here

But when I am calling planner API to get task start date/time like this:

https://graph.microsoft.com/v1.0/planner/plans/xxxxxxxxxx/tasks

The API returns dates with time (and the time is not zero and not UTC-zero). In this example, it's 10:00. Where is this 10:00 coming from? May it be hardcoded in planner?! My local time when I created that task was 18:23

enter image description here

Basically, the question is, what is this time (may it be different in different organizations / teams)? Or more specifically, how do I get pure date (the date displayed by the planner itself) from that value? Removal of the time seems to be a wrong option? (the time may be overlapping to the next / previous day, depending on the time zone). In which time zone is the time, returned by the planner API? Why is it not zero (or UTC-zero), if planner supports only dates?


Solution

  • Planner stores the date picked in the UI as 10 AM UTC of the picked date. That specific value causes the Local time equivalent to be in the same date as most places. The recommendation for clients is to take the time value with it's offset (in cases Planner Web sets this, the offset will be 0, which is indicated by the Z suffix in your sample), and convert it to local time to display (just the date portion of the resulting value).