Having problem to understand the departAt parameter, If I want to set the UTC-time offset to for example New York (-4) it works as expected
Posting a Curl call for the request works as expected.
curl --location --request POST 'https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=62.40467485319353,16.69276598618868:62.47793784549315,17.3332779176645&vehicleMaxSpeed=70&minDeviationDistance=100&minDeviationTime=0&travelMode=truck&traffic=True&computeTravelTimeFor=all&subscription-key=<key>&departAt=2021-09-20T10:40:46-04:00' \
--header 'content: application/json;utf-8' \
--header 'Content-Type: application/json' \
--data-raw '{
"supportingPoints": {
"type": "GeometryCollection",
"geometries": [{
"type": "Point",
"coordinates": [16.692766, 62.404675]
},{
"type": "Point",
"coordinates": [17.334278, 62.479572]
}]
}
}'
However, If want to set departAt to Stockholm (+2) it returns 400 with the message ("departAt value must be in a valid date time format")
The only different in the below request is the time offset changed from -04:00 to +02:00.
curl --location --request POST 'https://atlas.microsoft.com/route/directions/json?api-version=1.0&query=62.40467485319353,16.69276598618868:62.47793784549315,17.3332779176645&vehicleMaxSpeed=70&minDeviationDistance=100&minDeviationTime=0&travelMode=truck&traffic=True&computeTravelTimeFor=all&subscription-key=<key>&departAt=2021-09-20T10:40:46+02:00' \
--header 'content: application/json;utf-8' \
--header 'Content-Type: application/json' \
--data-raw '{
"supportingPoints": {
"type": "GeometryCollection",
"geometries": [{
"type": "Point",
"coordinates": [16.692766, 62.404675]
},{
"type": "Point",
"coordinates": [17.334278, 62.479572]
}]
}
}'
While at this property in the request, the documentation is a bit fuzzy
"The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00)."
I assumed the origin point is the actual coordinate, or is it the origin caller time in some way?