GetTimeZoneDisplay (open)

Get the display name of a timezone

Syntax

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

STRING FUNCTION GetTimeZoneDisplay(STRING timezone, BOOLEAN dst, STRING style, STRING locale)

Parameters

STRING timezone

The time zone to display

BOOLEAN dst

If the DST version of the name should be displayed

STRING style

The style to show the name in (one of "long", "short", of "offset")

STRING locale

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

Return value

STRING

The display name of the time zone, or an empty string on error (i.e. non-existing time zone, unknown style)