Time Zone Library w/ DST Support

I am wondering if anyone knows of a library that handles time zones and daylight savings time that can take advantage of the fact that the Photon/Core is WiFi enabled. I’m guessing there isn’t really one so I’m thinking I might have to write one, if that’s the case I’d like input from the community. I know there is an Arduino time zone library but it’s not really all that “smart”.

@bko Made the SparkTime library, which may, or may not, be what you’re looking for. Take a peek in the library section of the web IDE to see if it’s what you need.

1 Like

I thought I had looked at that and decided it wasn’t what I needed, but it’s definitely pretty solid. My only question is why those NTP and DST features haven’t been merged into spark_wiring_time? I guess because it’s not part of the actual Wiring API? Nice work, @bko! Thanks for the tip, @Moors7!

Hi @tjp

SparkTime preceded the built-in time function by some months and is useful if you want NTP time which can be more accurate than the Spark cloud time.

I have been meaning to work on TZ and DST support for Spark cloud time but I have not had a chance to get to it.

SparkTime does not currently work on Photon because UDP does not seem to work but I hope the next update will fix that.

1 Like

Good to know! Thanks so much! I’d be glad to help once the UDP issue is resolved. :smile:

1 Like