Пример #1
0
        public void TestToDateTime()
        {
            var date = new UniversalTime(2014, 4, 26, 16, 53, 24);
            var jd   = new JulianDay(date, DateCalendar.Gregorian);

            Assert.AreEqual(date.ToDateTime(), jd.ToDateTime());
        }
Пример #2
0
        public void TestToDateTime()
        {
            var dt = DateTime.Now;

            dt = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second); // Remove milliseconds
            UniversalTime date = new UniversalTime(dt);

            Assert.AreEqual(dt, date.ToDateTime());
        }