I have problem with unix timestamp ( date +%s ). This command gives me a GMT time, however I am using CET, so the unix timestamp is in 1 hour late (and my rrdtool database too!). How I can change unix timestamp's to CET or add +1 hour?
With command "date" I get good time. Update:
@ubuntu:~/tmp$ date +%s%Z
@ubuntu:~/tmp$ cat /etc/timezone
Tue Jan 25 01:30:28 CET 2011
@ubuntu:~/tmp$ date +%s
@ubuntu:~/tmp$ in normal time: Tue, 25 Jan 2011 00:30:13 GMT
In online converters I can set the timezone, so maybe the numbers are equal for all timezone? Then the question is that, why rrdtools late a hour?
@ubuntu:~/tmp$ date -d @1295916112 Tue Jan 25 01:41:52 CET 2011
As we can see the timestamp is correct, only rrdtool is wrong. But why?