Exemple #1
0
        public void GetTimeFromUnixTimestamp_Int64_test()
        {
            var timestamp = 0;
            var result    = DateTimeExtensions.GetTimeFromUnixTimestamp(timestamp);

            Assert.NotNull(result);
        }
Exemple #2
0
 public void TestGetTimeFromUnixTimestamp()
 {
     Assert.Equal(new DateTime(1970, 01, 01, 12, 12, 12), DateTimeExtensions.GetTimeFromUnixTimestamp(15132));
     Assert.Equal(new DateTime(2000, 12, 12, 12, 12, 12),
                  DateTimeExtensions.GetTimeFromUnixTimestamp(976594332));
     Assert.Equal(new DateTime(2014, 02, 18, 04, 24, 59),
                  DateTimeExtensions.GetTimeFromUnixTimestamp(1392668699));
 }