using System;
using System.Text;
using System.Globalization;
class Sample
{
public static void Main()
{
foreach (TimeZoneInfo.AdjustmentRule rule in TimeZoneInfo.Local.GetAdjustmentRules())
{
Console.WriteLine("Rule: applies from " + rule.DateStart + " to " + rule.DateEnd);
Console.WriteLine(" Delta: " + rule.DaylightDelta);
Console.WriteLine(" Start: " + rule.DaylightTransitionStart);
Console.WriteLine(" End: " + rule.DaylightTransitionEnd);
Console.WriteLine();
}
}
}
The output:
Rule: applies from 1/1/0001 12:00:00 AM to 12/31/2006 12:00:00 AM
Delta: 01:00:00
Start: System.TimeZoneInfo+TransitionTime
End: System.TimeZoneInfo+TransitionTime
Rule: applies from 1/1/2007 12:00:00 AM to 12/31/9999 12:00:00 AM
Delta: 01:00:00
Start: System.TimeZoneInfo+TransitionTime
End: System.TimeZoneInfo+TransitionTime