public void RoundTrip(DateTime dt)
 {
     var parser = new DateTimeFieldParser();
     var serializer = new DateTimeFieldSerializer();
     var s = serializer.SerializeDate(dt);
     Console.WriteLine(s);
     var value = parser.ParseDate(s);
     Console.WriteLine(value.ToString("r"));
     Assert.AreEqual(dt, value);
 }
 public void ParseYears(string d, DateTime dt)
 {
     var p = new DateTimeFieldParser();
     Assert.AreEqual(dt, p.ParseDate(d));
 }
        public static DateTimeOffset Parse(string s)
        {
            var t = DateTimeFieldParser.ParseDate(s);

            return(new DateTimeOffset(t, TimeSpan.Zero));
        }