TimeZoneConverter class
时区转换器。 (1) 从 Windows (.NET) 时区到 iana 时区。 (2) 从 iana 时区到 windows (.NET) 时区。 windows ref: https://support.microsoft.com/en-us/help/22803/daylight-saving-time. iana ref: https://www.iana.org/time-zones.
方法
iana |
将 IANA 时区格式转换为 Windows 时区格式。 |
verify |
验证字符串是否为 Windows 时区或 iana 字符串 |
windows |
将 Windows 时区转换为 iana 时区。 |
方法详细信息
ianaToWindows(string)
将 IANA 时区格式转换为 Windows 时区格式。
static function ianaToWindows(ianaTimeZoneId: string): string
参数
- ianaTimeZoneId
-
string
IANA 时区格式。
返回
string
windows 时区格式。
verifyTimeZoneStr(string)
验证字符串是否为 Windows 时区或 iana 字符串
static function verifyTimeZoneStr(timezoneStr: string): boolean
参数
- timezoneStr
-
string
时区字符串
返回
boolean
是字符串是时区字符串
windowsToIana(string)
将 Windows 时区转换为 iana 时区。
static function windowsToIana(windowsTimeZoneId: string): string
参数
- windowsTimeZoneId
-
string
Windows 时区格式。
返回
string
Iana 时区格式。