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?
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.