GetTimeZoneIDForWindowsID (open)
Convert a Windows time zone name to a localization time zone name
Syntax
LOADLIB "wh::util/localization.whlib";
STRING FUNCTION GetTimeZoneIDForWindowsID(STRING timezone, STRING region)
Parameters
STRING timezone
The Windows time zone name, note that this name is case sensitive
STRING region
Optional region, may affect the the returned time zone (see examples)
Return value
STRING
The time zone name
Examples
// timezone1 = "Europe/Berlin"
timezone1 := GetTimeZoneIDForWindowsID("W. Europe Standard Time");
// timezone2 = "" (lower case doesn't match)
timezone2 := GetTimeZoneIDForWindowsID("w. europe standard time");
// timezone3 = "America/Los_Angeles"
timezone3 := GetTimeZoneIDForWindowsID("Pacific Standard Time", "US");
// timezone4 = "America/Los_Angeles" (default for PST without region)
timezone4 := GetTimeZoneIDForWindowsID("Pacific Standard Time");
// timezone5 = "America/Vancouver"
timezone5 := GetTimeZoneIDForWindowsID("Pacific Standard Time", "CA");