TimeZoneConverter class

Time zone converter. (1) From Windows (.NET) timezone to iana timezone. (2) From iana timezone to windows (.NET) timezone. windows ref: https://support.microsoft.com/en-us/help/22803/daylight-saving-time. iana ref: https://www.iana.org/time-zones.

Methods

ianaToWindows(string)

convert IANA timezone format to windows timezone format.

verifyTimeZoneStr(string)

Verify the string is windows timezone or iana string

windowsToIana(string)

Convert windows timezone to iana timezone.

Method Details

ianaToWindows(string)

convert IANA timezone format to windows timezone format.

static function ianaToWindows(ianaTimeZoneId: string): string

Parameters

ianaTimeZoneId

string

IANA timezone format.

Returns

string

windows timezone format.

verifyTimeZoneStr(string)

Verify the string is windows timezone or iana string

static function verifyTimeZoneStr(timezoneStr: string): boolean

Parameters

timezoneStr

string

time zone string

Returns

boolean

is the string is time zone string

windowsToIana(string)

Convert windows timezone to iana timezone.

static function windowsToIana(windowsTimeZoneId: string): string

Parameters

windowsTimeZoneId

string

Windows timezone format.

Returns

string

Iana timezone format.