How to find switch-dates for daylight saving time?
class Program
{
static void Main(string[] args)
{
for (int i = 2007; i < 2010; i++)
{
DaylightTime daylightTime = TimeZone.CurrentTimeZone.GetDaylightChanges(i);
Console.WriteLine("year : " + i.ToString());
Console.WriteLine("- switch winter/summer : " + daylightTime.Start.ToString());
Console.WriteLine("- switch summer/winter : " + daylightTime.End.ToString());
Console.WriteLine("");
}
Console.ReadLine();
}
}
Labels: .NET
0 Comments:
Post a Comment
<< Home