Start Time: 1/1/0001 12:00:00 AM Delta Time: 00:00:00 End Time: 1/1/0001 12:00:00 AM
This is a C# Program to get the daylight saving information.
This C# Program Gets the DayLight Saving Information.
Here the information about the current year’s daylight saving changes is obtained.
Here is source code of the C# Program to Get the DayLight Saving Information. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
/* * C# Program to Get the DayLight Saving Information */ using System; using System.Globalization; class Program { static void Main() { TimeZone z = TimeZone.CurrentTimeZone; DaylightTime t = z.GetDaylightChanges(DateTime.Today.Year); Console.WriteLine("Start Time: {0}", t.Start); Console.WriteLine("Delta Time: {0}", t.Delta); Console.WriteLine("End Time: {0}", t.End); Console.ReadLine(); } }
This C# program is used to get the DayLight saving information. The GetDaylightChanges() function indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current TimeZoneInfo object. Then the information about the current year’s daylight saving changes is obtained.
Start Time: 1/1/0001 12:00:00 AM Delta Time: 00:00:00 End Time: 1/1/0001 12:00:00 AM