# Time Zone Library w/ DST Support

**URL:** <https://community.particle.io/t/time-zone-library-w-dst-support/12681>\
**Category:** Libraries\
**Created:** [June 19, 2015, 4:45am UTC](https://community.particle.io/t/time-zone-library-w-dst-support/12681 "2015-06-19T04:45:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjp](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/tjp/32/5613_2.png) [@tjp](https://community.particle.io/u/tjp)\
**Post date:** [June 19, 2015, 4:45am UTC](https://community.particle.io/t/time-zone-library-w-dst-support/12681/1 "2015-06-19T04:45:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [June 19, 2015, 8:46am UTC](https://community.particle.io/t/time-zone-library-w-dst-support/12681/2 "2015-06-19T08:46:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tjp](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/tjp/32/5613_2.png) [@tjp](https://community.particle.io/u/tjp)\
**Post date:** [June 19, 2015, 7:54pm UTC](https://community.particle.io/t/time-zone-library-w-dst-support/12681/3 "2015-06-19T19:54:24Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [June 19, 2015, 8:15pm UTC](https://community.particle.io/t/time-zone-library-w-dst-support/12681/4 "2015-06-19T20:15:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tjp](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/tjp/32/5613_2.png) [@tjp](https://community.particle.io/u/tjp)\
**Post date:** [June 19, 2015, 8:17pm UTC](https://community.particle.io/t/time-zone-library-w-dst-support/12681/5 "2015-06-19T20:17:51Z")

</div>

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