Eryk Sun <eryk...@gmail.com> added the comment:

Note that this explanation in your commit is wrong and unhelpful: "likely 
because datetime.datetime.now in the native Windows Python takes into account 
both system timezone data and the TZ environment variable". When TZ is set, 
localtime() is based only on the TZ value, and daylight saving time uses only 
U.S. rules (e.g. beginning 2021-03-14 and ending 2021-11-07). The value must be 
of the form "tzn [+|-]hh[:mm[:ss] ][dzn]", but there is no validation. So 
"Europe/Moscow" is invalid and gets parsed as UTC with U.S. DST. I recommend 
clearing the TZ variable because the value format is non-standard, and its DST 
support is U.S.-centric nonsense.

----------

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

Reply via email to