Mega Code Archive

 
Categories / C# / Date Time
 

Gets a value indicating whether the time zone has any daylight saving time rules

using System; using System.Collections.ObjectModel; public class Example {    public static void Main()    {         ReadOnlyCollection<TimeZoneInfo> zones = TimeZoneInfo.GetSystemTimeZones();         foreach(TimeZoneInfo zone in zones)         {            if (! zone.SupportsDaylightSavingTime)               Console.WriteLine(zone.DisplayName);         }    } }