GetAvailableTimeZones (open)

List all available country-specific and general time zones

Syntax

LOADLIB "wh::util/localization.whlib";

RECORD ARRAY FUNCTION GetAvailableTimeZones(STRING locale)

Parameters

STRING locale

The language or locale to use (e.g. 'en', 'en-GB', 'nl' or 'zh-Hans-CN')

Return value

RECORD ARRAY

The list of time zones

STRING code

Two-letter country code (e.g. "NL"), empty for general time zones

STRING comments

Display name of the time zone in the requested locale or language

STRING tz

Time zone name, which can be used to convert times using UTCToLocal and LocalToUTC (e.g. "Europe/Amsterdam")

STRING ARRAY tz_split

Time zone name, split into parts (e.g. [ "Europe", "Amsterdam" ])