This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, p-ganssle, tim.peters
Date 2018-06-05.18:37:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1528223875.79.0.592728768989.issue28602@psf.upfronthosting.co.za>
In-reply-to
Content
Paul,

In your opening post to this issue you suggested to change one line [1] in Lib/datetime.py from

dtdst = dt.dst()

to

dtdst = dt.replace(fold=1).dst()

This looks like a rather innocuous change, but it does not by itself make fromutc() return properly "enfolded" instances.  IIRC, the best algorithm that Tim and I were able to come up with to derive the fold value required something like six utcoffset() probes.

PR 7425 that you submitted looks somewhat involved.  Can you submit an equivalent datetime.py patch?

[1]: https://github.com/python/cpython/blob/c56b17bd8c7a3fd03859822246633d2c9586f8bd/Lib/datetime.py#L1125
History
Date User Action Args
2018-06-05 18:37:55belopolskysetrecipients: + belopolsky, tim.peters, p-ganssle
2018-06-05 18:37:55belopolskysetmessageid: <1528223875.79.0.592728768989.issue28602@psf.upfronthosting.co.za>
2018-06-05 18:37:55belopolskylinkissue28602 messages
2018-06-05 18:37:55belopolskycreate