The time is 7 hours difference in msys2 and windows term
windows cmd below
C:\Users\xxxxxx>python3
Python 3.10.6 (main, Aug 12 2022, 18:00:29) [GCC 12.1.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.now()
datetime.datetime(2022, 9, 12, 11, 21, 4, 285171)
>>>
msys2 below
# xxxxxx @ xxxxxx-computer in ~ [11:19:28]
$ python3
Python 3.10.6 (main, Aug 12 2022, 18:00:29) [GCC 12.1.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.now()
datetime.datetime(2022, 9, 12, 4, 19, 54, 709405)
>>>
There is run just in the sametime
what is happed?
I can not reproduce the issue in my system. Try to check if your system time and timezone is correct.
in msys2 ,i use this ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
I use ZSH for msys2.
when I restart msys2 ,I type zsh again, that is OK, no time difference .
I don't know what's happed?
Who can tell me why?
I found the reason。 In my env , "python3" is set "alias python3='/usr/bin/winpty python3'"
When I use "/mingw64/bin/python3" ,that is OK.
so , Does the "winpty" has some config that we don't understand/?
winpty is just like simple pipe. It should not modify time.