Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue28602>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to