EDIT: more info added after njd's answer.
Changing the env variable TZ does have effect.
I live in Sweden, where time is CET in winter, CEST in summer.
I tested both UTC, CET, and CEST, and reached strange (for me) results:
C:\Program\Git\bin>set TZ=UTC
C:\Program\Git\bin>.\date
Mon Feb 15 12:53:26 GMT 2010
C:\Program\Git\bin>set TZ=CET
C:\Program\Git\bin>.\date
Mon Feb 15 12:53:50 GMT 2010
C:\Program\Git\bin>set TZ=CEST
C:\Program\Git\bin>.\date
Mon Feb 15 12:53:59 GMT 2010
C:\Program\Git\bin>set TZ=CET+1
C:\Program\Git\bin>.\date
Mon Feb 15 11:54:27 CET 2010
C:\Program\Git\bin>set TZ=CET-1
C:\Program\Git\bin>.\date
Mon Feb 15 13:54:35 CET 2010
Setting TZ to CET or CEST has no effect. The date displayed is still GMT.
It seems that the string CET alone has no effect. Is it only a string for displaying, and is only taken into account if there is a explicit offset.
C:\Program\Git\bin>set TZ=FOO-1
C:\Program\Git\bin>.\date
Mon Feb 15 14:00:29 FOO 2010
C:\Program\Git\bin>set TZ=BAR-1
C:\Program\Git\bin>.\date
Mon Feb 15 14:00:42 BAR 2010
So it seems.
-1 has the correct effect. But Sweden's time is UTC+1:
CET on wikipedia
Is there a mismatch in the convention, -1 in TZ is UTC+1?
If I want to let the OS decide if it's summer or winter as indicated in njd's reply, I can omit the start and end time. I suppose the correct string is TZ=CET-1CEST-2
, is that correct?
I am not sure what windows does in summertime. If it updates the clock itself, the string above will not work. If it updates the offset only, then this might work.
More insights?