programming-examples/c-sharp/Events/C# Program to Get the DayLight Saving Information.cs

17 lines
474 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
/*
* 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();
}
}