예제 #1
0
        public void Can_Deserialize_Iso8601DateTimeWithOffset()
        {
            Iso8601DateTimeTestStructure payload = GetPayLoad <Iso8601DateTimeTestStructure>("iso8601datetimes.txt");

            Assert.AreEqual(
                new DateTime(2012, 7, 19, 10, 23, 25, 544, DateTimeKind.Utc),
                payload.DateTimeWithOffset.ToUniversalTime());
        }
예제 #2
0
        public void Can_Deserialize_Iso8601DateTimeLocal()
        {
            Iso8601DateTimeTestStructure payload = GetPayLoad <Iso8601DateTimeTestStructure>("iso8601datetimes.txt");

            Assert.AreEqual(
                new DateTime(2012, 7, 19, 10, 23, 25, DateTimeKind.Utc),
                payload.DateTimeLocal);
        }