Hello guys,
I have troubles with the Time class. Am running on Photon firmware 0.6.0
The Photon firmware docu says this:
now()
Retrieve the current time as seconds since January 1, 1970 (commonly known as “Unix time” or “epoch time”). This time is not affected by the timezone setting.
However, when testing I noticed that Time.now() AND local() is indeed affected by the zone setting and also by the DST settings. I wonder whether this is wrong docu or wrong implementation?
What I did is the following
zone(1.0) == Berlin Time offset right?
DST offset is default (1.0) but off now in wintertime right? I checked with isDST and it is not set in this example.
So I would expect time() still return UTC and local return my actual local time. However, I do neither get correct UTC time nor the correct local time. It looks like now() become my timezone and local() something else? Mayhaps am doing something wrong there?
My debug output is created using
Time.format(Time.now(), TIME_FORMAT_DEFAULT));
And Time.format(Time.local(), TIME_FORMAT_DEFAULT));
Any hints highly appreciated.
Thank you!