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

bpo-28602: [WIP] Add fold support to fromutc #7425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pganssle
Copy link
Member

@pganssle pganssle commented Jun 5, 2018

This is an example implementation of generic fold support in datetime.fromutc, for purposes of discussion. The idea here is that so long as utcoffset - dst is constant (as is the fundamental assumption of the current fromutc implementation) and the utcoffset and dst implementations respect the fold parameter, this will always set the fold parameter correctly in fromutc.

This needs more extensive tests and a pure Python implementation (plus I don't think I was amazingly careful about the reference counts), but the overall outline is there. It's basically a port of the current base dateutil implementation.

https://bugs.python.org/issue28602

https://bugs.python.org/issue28602

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

Successfully merging this pull request may close these issues.

None yet

5 participants