When creating a task using the REST API, the date/time needs to be in this format: P3DT15H36M12S. That string is an offset from the current time to the scheduled start time.
My question is this… when creating a task using StartDateTimeLocalOffset (for “client local time”) is that date/time string an offset from the computer that is creating the task or for the computer that will be executing the task?
So the client is unaware that there is an offset involved at all. When using the REST API you just submit the offset <EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset>.
So the offset is based on the current server time – P2D is 2 days from when the action was submitted to the REST API and gets translated to a specific day and time.
Let’s say that the server hosting the REST API is in the US Eastern time zone, and the computer that will be targeted is in China. I would need to translate the start/end times from the current time zone to the target’s time zone when submitting, correct?
When you submit the action at 10am Eastern and say it expires in 2 days you’re saying, “Run this action at 10am Client Local Time and expire it in 2 days”.
In other words: Start at 10am in CST (China Standard Time) and expire two days after that.
So if you want it to start at some other time you would need to offset the start time.
@strawgate . We are having the same issue while executing an action using REST API on clients. We have tried to define an action which has a 2 hour end time on the client. But it adds the offset to the server time instead of the client time. We do not specify any start time. Which means, we send an action now using Rest API to 3-4 clients with endtimelocaloffset , some are in APAC and it does not even start. Server in CET timezone.