Message318780
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 |
|
Date |
User |
Action |
Args |
2018-06-05 18:37:55 | belopolsky | set | recipients:
+ belopolsky, tim.peters, p-ganssle |
2018-06-05 18:37:55 | belopolsky | set | messageid: <1528223875.79.0.592728768989.issue28602@psf.upfronthosting.co.za> |
2018-06-05 18:37:55 | belopolsky | link | issue28602 messages |
2018-06-05 18:37:55 | belopolsky | create | |
|