public void TestFromDateTimeIgnoresSystemTimeZone() {
      System.DateTime dateTime = new System.DateTime(2015, 1, 30, 23, 59, 58, DateTimeKind.Utc);
      DateTime dfpDateTime = DateTimeUtilities.FromDateTime(dateTime, "America/New_York");

      Assert.AreEqual(dfpDateTime.date.year, 2015);
      Assert.AreEqual(dfpDateTime.date.month, 1);
      Assert.AreEqual(dfpDateTime.date.day, 30);
      Assert.AreEqual(dfpDateTime.hour, 23);
      Assert.AreEqual(dfpDateTime.minute, 59);
      Assert.AreEqual(dfpDateTime.second, 58);
      Assert.AreEqual(dfpDateTime.timeZoneID, "America/New_York");
    }
Esempio n. 2
0
        public void TestFromDateTimeIgnoresSystemTimeZone()
        {
            System.DateTime dateTime    = new System.DateTime(2015, 1, 30, 23, 59, 58, DateTimeKind.Utc);
            DateTime        dfpDateTime = DateTimeUtilities.FromDateTime(dateTime, "America/New_York");

            Assert.AreEqual(dfpDateTime.date.year, 2015);
            Assert.AreEqual(dfpDateTime.date.month, 1);
            Assert.AreEqual(dfpDateTime.date.day, 30);
            Assert.AreEqual(dfpDateTime.hour, 23);
            Assert.AreEqual(dfpDateTime.minute, 59);
            Assert.AreEqual(dfpDateTime.second, 58);
            Assert.AreEqual(dfpDateTime.timeZoneID, "America/New_York");
        }