diff --git a/pendulum/pendulum.py b/pendulum/pendulum.py index 431d995f..119c6622 100644 --- a/pendulum/pendulum.py +++ b/pendulum/pendulum.py @@ -176,7 +176,7 @@ def __init__(self, year, month, day, self._second = dt.second self._microsecond = dt.microsecond self._tzinfo = dt.tzinfo - self._fold = getattr(dt, 'fold', fold) + self._fold = fold self._timestamp = None self._int_timestamp = None diff --git a/tests/pendulum_tests/test_construct.py b/tests/pendulum_tests/test_construct.py index b7dcc4bd..35d3fac8 100644 --- a/tests/pendulum_tests/test_construct.py +++ b/tests/pendulum_tests/test_construct.py @@ -202,6 +202,8 @@ def test_init_fold_is_honored_if_explicit(self): d = Pendulum(2013, 3, 31, 2, 30, tzinfo='Europe/Paris', fold=0) self.assertPendulum(d, 2013, 3, 31, 1, 30) + self.assertEqual(d.fold, 0) d = Pendulum(2013, 3, 31, 2, 30, tzinfo='Europe/Paris', fold=1) self.assertPendulum(d, 2013, 3, 31, 3, 30) + self.assertEqual(d.fold, 1)