public void BeforeDSTDay()
        {
            var ctrl = new CnDTimeInputOffset3H();
            ctrl.SelectedDateTime = new DateTime(2015, 10, 25, 1, 0, 0, DateTimeKind.Local);
            ctrl.OnTimeChanged(TimeSpan.FromHours(10));

            Assert.That(ctrl.SelectedDateTime, Is.EqualTo(new DateTime(2015, 10, 24, 10, 0, 0, DateTimeKind.Local)));
        }
        public void AfterDSTDay()
        {
            var ctrl = new CnDTimeInputOffset3H();

            ctrl.SelectedDateTime = new DateTime(2015, 10, 25, 5, 0, 0, DateTimeKind.Local);
            ctrl.OnTimeChanged(TimeSpan.FromHours(10));

            Assert.That(ctrl.SelectedDateTime, Is.EqualTo(new DateTime(2015, 10, 25, 10, 0, 0, DateTimeKind.Local)));
        }
        public void DSTWinter()
        {
            var ctrl = new CnDTimeInputOffset3H();

            ctrl.SelectedDateTime = new DateTime(2015, 10, 24, 3, 0, 0, DateTimeKind.Local);
            ctrl.OnTimeChanged(TimeSpan.FromMinutes(140)); // Add 2h20
            ctrl.IsSummerPeriod = false;

            var expected = new DateTime(2015, 10, 25, 1, 20, 0, DateTimeKind.Utc);

            Assert.That(ctrl.SelectedDateTime, Is.EqualTo(expected.ToLocalTime()));
        }
        public void DSTWinter()
        {
            var ctrl = new CnDTimeInputOffset3H();
            ctrl.SelectedDateTime = new DateTime(2015, 10, 24, 3, 0, 0, DateTimeKind.Local);
            ctrl.OnTimeChanged(TimeSpan.FromMinutes(140)); // Add 2h20
            ctrl.IsSummerPeriod = false;

            var expected = new DateTime(2015, 10, 25, 1, 20, 0, DateTimeKind.Utc);

            Assert.That(ctrl.SelectedDateTime, Is.EqualTo(expected.ToLocalTime()));
        }