Get a TimeZoneInfo from the registry based on its identifier in CSharp
Description
The following code shows how to get a TimeZoneInfo from the registry based on its identifier.
Example
/* w w w .j a va2s. c om*/
using System;
public class Example
{
public static void Main()
{
DateTime thisTime = DateTime.Now;
// Get Tokyo Standard Time zone
TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
DateTime tstTime = TimeZoneInfo.ConvertTime(thisTime, TimeZoneInfo.Local, tst);
}
}