public void TestGetUtcTimeFromUserTZone() { var tSpan = "10:55:00"; var resolver = new DateTimeResolver(tSpan); var dt = resolver.GetUtcTimeFromUserTZone(DateTime.Parse("2000/1/1 10:55:00")); var utc = new DateTime(2000, 1, 1, 0, 0, 0); Assert.IsTrue(dt == utc); }
public void TestGetUtcTimeFromUserTZone() { var tSpan = "10:55:00"; _blogConfigMock.Setup(m => m.GeneralSettings).Returns(new GeneralSettings { TimeZoneUtcOffset = tSpan }); var resolver = new DateTimeResolver(_blogConfigMock.Object); var dt = resolver.GetUtcTimeFromUserTZone(DateTime.Parse("2000/1/1 10:55:00")); var utc = new DateTime(2000, 1, 1, 0, 0, 0); Assert.IsTrue(dt == utc); }