Exemplo n.º 1
0
        public void ToString_Test()
        {
            var datetime = new DateTime(2018, 5, 6, 11, 22, 33, 111, DateTimeKind.Utc);
            var utc      = new DateTimeUtc(datetime);

            Assert.Equal(datetime.ToString(), utc.ToString());
        }
Exemplo n.º 2
0
        public void ToString_FormatTest()
        {
            var utc = new DateTimeUtc(2018, 5, 6, 11, 22, 33, 111);

            Assert.Equal("2018-05-06 11:22:33.111 +00:00", utc.ToString("yyyy-MM-dd HH:mm:ss.fff zzz"));
        }