Home > @magiclane/maps-sdk > TimezoneService > getTimezoneInfoFromTimezoneId

TimezoneService.getTimezoneInfoFromTimezoneId() method

Async gets timezone info based on a timezone id and a timestamp

**Parameters**

* **IN** *timezoneId* The geographic location on earth of type: "Continent/City". Examples: Europe/Paris, America/New_York, Europe/Moscow * **IN** *time* The time for which offsets are calculated (UTC) * **IN** *accurateResult* If left 'false' the result will be computed using the available offline resource. If 'true' an HTTP request will be performed for computing the result * **IN** *onComplete* The callback which will be called when the operation completes. * Will be called with GemError.success error and non-null result upon success. * Will be called with GemError.internalAbort error and null result if the result parsing failed or server internal error occurred

**Returns**

* EventDrivenProgressListener for the operation progress if the operation could be started, null otherwise

**Throws**

* An exception if it fails.

Signature:

static getTimezoneInfoFromTimezoneId(params: {
        timezoneId: string;
        time: Date;
        onComplete?: (error: GemError, result?: TimezoneResult) => void;
    }): EventDrivenProgressListener | null;

Parameters

Parameter

Type

Description

params

{ timezoneId: string; time: Date; onComplete?: (error: GemError, result?: TimezoneResult) => void; }

params properties:

  • timezoneId: string
  • time: Date
  • Optional onComplete?: (error: GemError, result?: TimezoneResult) => void

Returns:

EventDrivenProgressListener | null