HI Guys,

Prob a very simple one but im stumped, I run the following command and get:

date
Wednesday, 19 August 2009 09:20:59 BST

But when I run

date -u '+%y%m%d.%H:%M:%S'
090819.08:21:27

My question is why is the second command an hour behind? In my environment the following are set:

LC_TIME=en_GB.ISO8859-15
TZ=GB

I have tried it on a different server with exactly the same commands and env variables and get the correct result, what am I doing wrong here?

hi,

But why does the date command give me the correct date then when I try and use the date -u command does it suddenly consider day light savings?

Actually, the below command gives the time as per GMT :

date -u

where as on using

date

, we get the time according to what we have set our time zone (TZ) as.

This question has already been answered. Start a new discussion instead.