예제 #1
0
        public void AreSameSecondDoesNotRoundUp()
        {
            DateTime dt1 = new DateTime(2006, 1, 2, 3, 4, 5, 999, DateTimeKind.Utc);
            DateTime dt2 = new DateTime(2006, 1, 2, 3, 4, 6, 0, DateTimeKind.Utc);

            Assert.IsTrue(!DateTimeUtility.AreSameSecond(dt1, dt2));
        }
예제 #2
0
        public void AreSameSecondClearsMilliseconds()
        {
            DateTime dt1 = new DateTime(2006, 1, 2, 3, 4, 5, 1, DateTimeKind.Utc);
            DateTime dt2 = new DateTime(2006, 1, 2, 3, 4, 5, 999, DateTimeKind.Utc);

            Assert.IsTrue(DateTimeUtility.AreSameSecond(dt1, dt2));
        }