public static void Main()
DateTime timeUtc = DateTime.UtcNow;
TimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
DateTime cstTime = timeUtc.ConvertTimeFromUtc(cstZone);
Console.WriteLine("The date and time are {0} {1}.", cstTime, cstZone.StandardName);
catch (TimeZoneNotFoundException)
Console.WriteLine("The registry does not define the Central Standard Time zone.");
catch (InvalidTimeZoneException)
Console.WriteLine("Registry data on the Central Standard Time zone has been corrupted.");