Class LocationTime

java.lang.Object
com.here.sdk.core.LocationTime

public final class LocationTime extends Object

This struct presents all the time data tied to a location, like an arrival or departure time. The time data is originally specified in RFC 3339, section 5.6 format. For example, "2022-03-23T16:07:31+01:00" in Cracow, Poland, i.e. a Central European Time (CET) location. Note that this struct doesn't give any data on the tied location. The location should be derived from the context.

  • Field Details

    • localTime

      @NonNull public final Date 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

      @NonNull public final Date 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

      @NonNull public final Duration 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.

  • Constructor Details

    • LocationTime

      public LocationTime(@NonNull Date localTime, @NonNull Date utcTime, @NonNull Duration utcOffset)

      Creates a new instance.

      Parameters:
      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.

  • Method Details