Start Time: 1/1/0001 12:00:00 AM Delta Time: 00:00:00 End Time: 1/1/0001 12:00:00 AM
Users Online
· Guests Online: 99
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
Forum Threads
Newest Threads
No Threads created
Hottest Threads
No Threads created
Latest Articles
Articles Hierarchy
C# Program to Get the DayLight Saving Information
C# Program to Get the DayLight Saving Information
This is a C# Program to get the daylight saving information.
Problem Description
This C# Program Gets the DayLight Saving Information.
Problem Solution
Here the information about the current year’s daylight saving changes is obtained.
Program/Source Code
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(); } }
Program Explanation
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.
Runtime Test Cases
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.