Unix timestamp, timezone and RTC (RTClib)

Hello to all,
when I run from the command prompt "date +% s" I get the unixtime but always in UTC timezone. Right?

example:

root@casa1:~# date
Thu Mar 20 09:24:03 CET 2014
root@casa1:~# date +%s
1395303847

and the timestamp is equivalent to
Thu, March 20, 2014 08:24:07 GMT

Is there a way to get the unix timestamp localized CET?
I searched the web but have not found anything ...

I may add timestamps to 3600 seconds (1 hour) to get the date of the timezone CET ... but I do not know what happens with daylight saving time ... what do you think?

thanks

when I run from the command prompt "date +% s" I get the unixtime but always in UTC timezone. Right?

Right. The reason for that is because it is universal. If you want CET, just make an offset variable of +1 (3600s) and add that to the timestamp.

but I do not know what happens with daylight saving time

Like you said though, daylight savings can be an issue. It's more accepted (at least in the scientific community) to stick with UTC or even GMT.

mmmm OK... and how can I understand if DST is active or not?

My problem: I have to compare 2 unixtime: Linux (Yun) unixtime and the unixtime of my RTC.
Linux always returns the timestamp in UTC ... and it's right... but unixtime() command of Adafruit RTClib library, returns the timestamp in your timezone. I think it performs only a simple conversion of the date.

thanks a lot

during my train trip I found a solution XD : in my sketch, I take the date from the RTC and convert it into unixtime from a bash script. For example:

RTCnow String = "2014-03-21 07:54:12";
UnixTR ProcExec String = ("date", "- d = '" + RTCnow + "' + '% s'");

where ProcExec is:

String ProcExec (Comm String, String Par) {
String res = "";
Process p;
p.begin (Comm);
p.addParameter (Par);
p.run ();
while (p.available ()> 0) {
char c = p.read ();
Res + = c;
}
return res;
}

Now I have RTC date in unixtime in UTC!

Does anyone have a better idea?

Thanks