The IsDaylightSavingTime and GetUtcOffset methods work as follows : TimeZone : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » TimeZone »

 

The IsDaylightSavingTime and GetUtcOffset methods work as follows








    
 

using System;
public class MainClass {
    public static void Main() {
        TimeZone zone = TimeZone.CurrentTimeZone;
        DateTime dt1 = new DateTime(2008, 1, 1);
        DateTime dt2 = new DateTime(2008, 6, 1);
        Console.WriteLine(zone.IsDaylightSavingTime(dt1));
        Console.WriteLine(zone.IsDaylightSavingTime(dt2));
        Console.WriteLine(zone.GetUtcOffset(dt1));
        Console.WriteLine(zone.GetUtcOffset(dt2));
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» TimeZone