예제 #1
0
        public void UnixTimestampMilliseconds()
        {
            DateTime now  = DateTime.Now.ToUniversalTime();
            DateTime now2 = DateTimeUtility.FromUnixTimestampMilliseconds(DateTimeUtility.ToUnixTimestampMilliseconds(now));

            Assert.Equal(now.ToString("yyyyMMdd-HHmmss"), now2.ToString("yyyyMMdd-HHmmss"));
        }
예제 #2
0
 public void FromUnixTimestampMillisecondsTest(DateTime datetime, long unixTimestampMilliseconds)
 {
     Assert.Equal(datetime, DateTimeUtility.FromUnixTimestampMilliseconds(unixTimestampMilliseconds));
 }