LocationTime constructor

const LocationTime(
  1. DateTime localTime,
  2. DateTime utcTime,
  3. Duration utcOffset
)

Creates a new instance.

  • localTime The time as observed in the tied location. For example, if a route is requested in Cracow, Poland, the local time is "2022-03-23T16:07:31" in CET, i.e. one hour ahead of the UTC time.
  • utcTime The time as Coordinated Universal Time (UTC). For example, if a route is requested in Poland, the UTC time is "2022-03-23T15:07:31", i.e. one hour behind the local time.
  • utcOffset The UTC offset is the difference between the local time and the Coordinated Universal Time (UTC) in seconds. For example, if the local time is UTC+01:00, it is +3600 and if the local time is UTC-05:00, it is -18000.

Implementation

const LocationTime(this.localTime, this.utcTime, this.utcOffset);