public static void Main()
var timeZones = TimeZoneInfo.GetSystemTimeZones();
foreach (var zone in timeZones){
Console.WriteLine($"{zone.Id} | {zone.DisplayName}");
DateTime timeUtc = DateTime.UtcNow;
TimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles");
DateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(timeUtc, cstZone);
Console.WriteLine("The date and time are {0} {1}.",
cstZone.IsDaylightSavingTime(cstTime) ?
cstZone.DaylightName : 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.");