Is there a library similar to .NET like .isDayLightSavingTime that I can call? Or please recommend how I should handle DST.
What I would prefer is look up time zone at Photon Boot based on IP and automatically set Photon time zone UTC offset. At the same time check for DST.
There are some first steps into that direction but it’s not yet that simple.
You can look at this closed (?) issue which should provide some useful info
Would it be possible to provide a bit more detail on DST in the documentation? I read what is there and assumed (wrongly) that if I called Time.isDST() then I would get true or false depending on my local time and then I could choose to use DST by calling Time.beginDST(); @ScruffR is pointing out that these are really toothless functions? I have to determine whether DST is in use in my time zone, having done that I call Time.beginDST(); and from then on Time.isDST() returns true. As @ScruffR points out, what is the use of that, I could set my own flags and offsets. Can this be clarified in the documentation to save us getting all excited about DST being added?
If anyone is interested I have created a basic DST class which uses a couple of simple arrays which are used to check if local time is inside the DST limits.
It works on a rule like DST starts on the first Sunday of April at 2AM and clocks go forward an hour.
Potentially very interested @pNrie, as far as you know, should this Electron code work the Core, too? I am aware sometimes code written for later particle devices won’t compile for the Core (in my prior experience it was because of timers)
@daneboomer I can only suggest you download it from Github, address above and try. I don’t think it uses anything special, just time and date functions.