[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-11 Thread Mike Kaganski
Mike Kaganski added the comment: @Eryk Sun: yes, of course you are right - but please see the date of the commit; I didn't know what you kindly explained me in your reply yesterday :-) Thank you again. -- ___ Python tracker

[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-11 Thread Eryk Sun
Eryk Sun 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

[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-10 Thread Mike Kaganski
Mike Kaganski added the comment: Thank you Eryk! This is a good workaround for me. I have implemented it: https://git.libreoffice.org/core/+/3bcaa4ba79477a21251ddaa06e0ea159196a7ffb It looks like it's not a Python's problem; I suppose this may be closed. Thanks again! --

[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-09 Thread Eryk Sun
Eryk Sun added the comment: > 2. Execute 'set TZ=Europe/Moscow' The Windows C runtime supports a simple format for the TZ environment variable, which is detailed in the documentation of _tzset() [1]. For example, it's "MSK-3" for Moscow Standard Time. It's -3 because the offset is from

[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-09 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-08 Thread Mike Kaganski
New submission from Mike Kaganski : On a Windows 10 system, which TZ is set to Moscow (UTC+3), I use a native Windows Python build (as opposed to e.g. one from Cygwin). Specifically, I tested both custom Python build created by LibreOffice project, as well as the Python by Python Software