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")); }
public void FromUnixTimestampMillisecondsTest(DateTime datetime, long unixTimestampMilliseconds) { Assert.Equal(datetime, DateTimeUtility.FromUnixTimestampMilliseconds(unixTimestampMilliseconds)); }