Time parameters
When planning a route, set the route date according to the time zone.
Route date
To set the route date, use the options.date
parameter in YYYY-MM-DD
format. The parameter is important for calculating the relative time windows. If the route date is not defined by the user, then the current date is used according to the time zone.
If you plan the route via the interface, the route date is defined in the settings.
If you don't pass the options.date
parameter value, then the solution can't be viewed or edited in the routing workspace. It can be viewed only in JSON format or on the map.
Time zone
Relative time windows are calculated in the time zone that is set with the options.time_zone
parameter. The time_zone
field is mandatory.
The API has two options for specifying the time zone:
As a number from -12 to 14 that determines the shift relative to UTC in hours. For example,
1
corresponds to GMT+1 (London).As a string. For example,
Europe/London
.
When you plan a route in the interface, the time zone specified in the settings is used.
Use list of time zones to specify the time zone.
GMT and Etc/GMT are two different ways to specify a time zone. For example, GMT+1 corresponds to Etc/GMT-1.