Mega Code Archive

 
Categories / C# / Date Time
 

Transition to DST in local time zone occurs on 3112007 at 2

using System; using System.Globalization; public class Test {    public static void Main()    {          DateTimeOffset dto;                    dto = new DateTimeOffset(2007, 3, 11, 3, 30, 0, new TimeSpan(-7, 0, 0));                Console.WriteLine(dto.LocalDateTime);          dto = new DateTimeOffset(2007, 3, 11, 2, 30, 0, new TimeSpan(-7, 0, 0));          Console.WriteLine(dto.LocalDateTime);    } }