departureTime property

DateTime? departureTime
final

Specifies the desired time of departure. The departure time may be specified in two cases:

  • For requests where the travel mode is transit: You can optionally specify one of departureTime or arrivalTime. If neither time is specified, the departureTime defaults to now (that is, the departure time defaults to the current time).

  • For requests where the travel mode is driving: You can specify the departureTime to receive a route and trip duration (response field: durationInTraffic) that take traffic conditions into account. The departureTime must be set to the current time or some time in the future. It cannot be in the past.

Note: If departure time is not specified, choice of route and duration are based on road network and average time-independent traffic conditions. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.

Implementation

final DateTime? departureTime;