Check if DateTime is within the daylight saving time range for the current time zone in CSharp
Description
The following code shows how to check if DateTime is within the daylight saving time range for the current time zone.
Example
/*from w w w .ja va 2 s .co m*/
using System;
public class MainClass{
public static void Main(String[] argv){
DateTime date1 = new DateTime(2008, 6, 1, 7, 47, 0);
Console.WriteLine(date1.IsDaylightSavingTime());
}
}
The code above generates the following result.