TimeZoneInfo also provides IsDaylightSavingTime and GetUtcOffset methods--the difference is that they accept either a DateTime or DateTimeOffset. : TimeZoneInfo : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » TimeZoneInfo »

 

TimeZoneInfo also provides IsDaylightSavingTime and GetUtcOffset methods--the difference is that they accept either a DateTime or DateTimeOffset.








    
 

using System;
public class MainClass {
    public static void Main() {

        TimeZoneInfo wa = TimeZoneInfo.FindSystemTimeZoneById("W. Australia Standard Time");

        Console.WriteLine(wa.Id);
        Console.WriteLine(wa.DisplayName);
        Console.WriteLine(wa.BaseUtcOffset);
        Console.WriteLine(wa.SupportsDaylightSavingTime);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» TimeZoneInfo