Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

TimeZoneInfo.TryConvertIanaIdToWindowsId(String, String) Method

Definition

Namespace:
System
Assemblies:
netstandard.dll, System.Runtime.dll
Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs
Source:
TimeZoneInfo.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

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

Parameters

ianaId
String

The IANA time zone ID.

windowsId
String

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

Returns

true if the ID conversion succeeded, false otherwise.

Remarks

This API is exclusively supported on .NET 6 and later versions, and only when the application utilizes the ICU library. 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


Feedback

Was this page helpful?