Zone Info. Try Convert Iana IdTo Windows Id(String, String) Method
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
The IANA time zone ID.
When this method returns, contains the Windows ID that corresponds to the specified IANA ID.
true if the ID conversion succeeded,
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:
- When the application runs on an operating system that does not have the ICU library, and the app does not utilize the app-local ICU feature.
- When the globalization invariant mode or NLS mode is enabled on Windows.
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.