public void TestAddDaysDSTAutumn() { DateTime utcDt = new DateTimeOffset(2018, 10, 27, 22, 0, 0, TimeSpan.Zero).UtcDateTime; DateTime localDt = DateTime.SpecifyKind(TimeZoneInfo.ConvertTimeFromUtc(new DateTimeOffset(2018, 10, 27, 22, 0, 0, TimeSpan.Zero).UtcDateTime, CentralEuropeStandardTime.CENTRAL_EUROPE_STANDARD_TIME), DateTimeKind.Unspecified); DateTime resultUtc = utcDt.AddDaysDST(1); DateTime resultLocal = localDt.AddDaysDST(1); Assert.AreEqual(DateTimeKind.Utc, resultUtc.Kind); Assert.AreEqual(DateTimeKind.Unspecified, resultLocal.Kind); Assert.AreEqual(25, (new TimeRange(utcDt, resultUtc)).Duration.TotalHours); Assert.AreEqual(25, (new TimeRange() { Start = TimeZoneInfo.ConvertTimeToUtc(DateTime.SpecifyKind(localDt, DateTimeKind.Unspecified), CentralEuropeStandardTime.CENTRAL_EUROPE_STANDARD_TIME), End = TimeZoneInfo.ConvertTimeToUtc(DateTime.SpecifyKind(resultLocal, DateTimeKind.Unspecified), CentralEuropeStandardTime.CENTRAL_EUROPE_STANDARD_TIME) }).Duration.TotalHours); }