Change time zone in MSYS

How to change the time zone to MSYS + MinGW for Windows if I only have the "date" command installed? There is no "tzconfig" or "tzselect" here.

When I try $ date --set = "Apr 01 23:08 UTC + 04: 00" I get the result 19:08 GMT + 0.

This is very important to me because the make command always gives me errors about files changed in the future.

+5
source share
4 answers

I had the same problem. My time zone is CET (GMT + 1).

I fixed this by setting the TZ environment variable as follows:

export TZ=CET-1CEST

Before setting the variable, I had:

(dos invitation)

c:\>time
Huidige tijd: 17:08:32,40

(msys shell)

$ date
Mon Oct 25 15:08:54 GMT 2010

TZ = CET-1CEST :

( dos)

c:\>time
Huidige tijd: 17:14:30,80

( msys)

$ export TZ=CET-1CEST
$ date
Mon Oct 25 17:15:05 CEST 2010

:

  • CET:
  • +/- x: , GMT ( GMT ​​ CET)
  • CEST: .
  • () +/- y: (DST) GMT. - , .

, . FOO BAR, , (, , ) , .

, , DST. , . .

+12

. Windows cmd.exe - :

d:\Users\NeilB>time
The current time is: 20:59:27.68
Enter the new time: 21:59

MSYS bash:

[neilb@GONERIL NeilB]$ date
Thu Apr  1 21:59:31 GMTDT 2010

, . .

0

. , : date --date = "4 ", -4h - ... , , , ""...

0

Geert, ~/.bash_profile, :

export TZ=CET-1CEST-2

And it works great.

0
source

All Articles