Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_fold attribute has inverted sense of PEP-495 #284

Closed
pganssle opened this issue Jul 25, 2016 · 1 comment · Fixed by #302
Closed

_fold attribute has inverted sense of PEP-495 #284

pganssle opened this issue Jul 25, 2016 · 1 comment · Fixed by #302
Assignees
Milestone

Comments

@pganssle
Copy link
Member

See discussion on #57. The _fold attribute should have the inverted sense.

This may need to be a breaking change, as the default value for fold is 0, meaning that, in Python 3.6:

from datetime import datetime, timedelta, timezone
from dateutil.tz import gettz

LA = gettz('US/Pacific')
t = datetime(2014, 11, 2, 1, tzinfo=LA)

t should be interpreted as the first 1AM, not the second 1 AM. This is the opposite of the assumption that has been made in every tzinfo subclass provided by dateutil up until this point.

Given that we've been pretty bad about ambiguous time zone support, hopefully no one is relying on this specific behavior, and the breaking change won't be so bad.

@pganssle
Copy link
Member Author

pganssle commented Nov 6, 2016

Implemented in #302.

@pganssle pganssle mentioned this issue Nov 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant