Usage
Typescript Import Format
//This namespace exports multiple static methods or members. To import
import * as TimeZoneUtils from "ojs/ojtimezoneutils";
//Now you can access the methods as TimeZoneUtils.methodName and so on
For additional information visit:
A utility class for retrieving available timezones. NOTE: This module automatically
imports 'ojs/ojtimezonedata' which is a module with a large amount of data.
Methods
-
(static) getAvailableTimeZones(): Array<AvailableTimeZoneType>
-
Gets the supported timezones for the current Locale. The returned value is an array of AvailableTimeZoneType objects. Each object represents a timezone and contains 2 properties:
Property Description id IANA timezone ID displayName It is the concatenation of three strings: - UTC timezone offset
- City name
- Generic time zone name
Returns:
supported timezones- Type
- Array.<AvailableTimeZoneType>