Skip to content

Conversation

@neonquill
Copy link
Contributor

@neonquill neonquill commented Apr 29, 2017

When creating a new Pendulum instance without passing in a TimezoneInfo object and using python 3.6, the internal fold parameter was not correct. In this scenario, self._fold was being set based on the fold parameter in the underlying datetime object. When using python3.6, this value exists, but is always set to 0 since Pendulum is not passing the fold parameter to the datetime constructor.

  • Changed self._fold to always be set based on the internal fold variable.
  • Added checks to the existing unit tests to verify that the fold parameter is being preserved.

All tests pass with python 3.6.1, did not test with any other versions.

When creating a new Pendulum instance without passing in a TimezoneInfo
object and using python 3.6, the internal fold parameter was not
correct.  In this scenario, self._fold was being set based on the fold
parameter in the underlying datetime object.  When using python3.6, this
value exists, but is always set to 0 since Pendulum is not passing the
fold parameter to the constructor.

 - Changed self._fold to always be set based on the internal fold
   variable.
 - Added checks to the existing unit tests to verify that the fold
   parameter is being preserved.
@sdispater sdispater merged commit 89e9ac2 into python-pendulum:master May 2, 2017
@sdispater
Copy link
Collaborator

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants