How to set the correct local time zone in git bash?

前端 未结 2 1059
臣服心动
臣服心动 2021-01-12 15:21

I am using git-bash on a Windows system.

The Windows clock shows local time, but inside git-bash everything is in GMT time:

$ date
Mon Mar 31 16:08:5         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-12 16:06

    Same problem here in my script. Windows was showing 15:47 and the "date" command in gitbash was answering 13:47.

    export TZ="CEST-2" 
    

    This fixed the problem for me. I wanted Paris time.

提交回复
热议问题