Saturday, 2 December 2017

C# Program to Get the DayLight Saving Information


Code:

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();
    }
}


Output:

Start Time: 1/1/0001 12:00:00 AM
Delta Time: 00:00:00
End Time: 1/1/0001 12:00:00 AM


More C# Programs:




















100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...