Uredi

Deli z drugimi prek


TimeZoneInfo.TryConvertWindowsIdToIanaId Method

Definition

Overloads

TryConvertWindowsIdToIanaId(String, String)

Tries to convert a Windows time zone ID to an IANA ID.

TryConvertWindowsIdToIanaId(String, String, String)

Tries to convert a Windows time zone ID to an IANA ID.

TryConvertWindowsIdToIanaId(String, String)

Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs

Tries to convert a Windows time zone ID to an IANA ID.

public:
 static bool TryConvertWindowsIdToIanaId(System::String ^ windowsId, [Runtime::InteropServices::Out] System::String ^ % ianaId);
public static bool TryConvertWindowsIdToIanaId (string windowsId, out string? ianaId);
static member TryConvertWindowsIdToIanaId : string * string -> bool
Public Shared Function TryConvertWindowsIdToIanaId (windowsId As String, ByRef ianaId As String) As Boolean

Parameters

windowsId
String

The Windows time zone ID.

ianaId
String

When this method returns, contains the IANA ID that corresponds to the specified Windows ID.

Returns

true if the ID conversion succeeded, false otherwise.

Remarks

This API is exclusively supported on .NET 6.0 and later versions. It is also supported when the application utilizes the ICU library, otherwise the API will fail. However, in .NET, the ICU library is not always used by default, particularly in the following scenarios:

If the application is running on a Windows OS version that lacks the ICU library, it has the option to opt-in and enable the usage of the ICU library through the App-Local ICU feature.

Applies to

TryConvertWindowsIdToIanaId(String, String, String)

Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs

Tries to convert a Windows time zone ID to an IANA ID.

public:
 static bool TryConvertWindowsIdToIanaId(System::String ^ windowsId, System::String ^ region, [Runtime::InteropServices::Out] System::String ^ % ianaId);
public static bool TryConvertWindowsIdToIanaId (string windowsId, string? region, out string? ianaId);
static member TryConvertWindowsIdToIanaId : string * string * string -> bool
Public Shared Function TryConvertWindowsIdToIanaId (windowsId As String, region As String, ByRef ianaId As String) As Boolean

Parameters

windowsId
String

The Windows time zone ID.

region
String

The ISO 3166 code for the country/region.

ianaId
String

When this method returns, contains the IANA ID that corresponds to the specified Windows ID.

Returns

true if the ID conversion succeeded, false otherwise.

Remarks

This API is exclusively supported on .NET 6.0 and later versions. It is also supported when the application utilizes the ICU library, otherwise the API will fail. However, in .NET, the ICU library is not always used by default, particularly in the following scenarios:

If the application is running on a Windows OS version that lacks the ICU library, it has the option to opt-in and enable the usage of the ICU library through the App-Local ICU feature.

Applies to