I finally received my Core wohooo, so I can start playing around. I decide using the time feature which is described in the documentation. All things work fine except the described set timezone feature:
Serial.print(Time.zone(-5));
the cloud stops compiling. IĀ“am not sure but I want to āsetā a time zone, I donĀ“t want to āprintā it, you know? Documentation wrong? I can see there a workaround like +x but maybe someone knows how to set the timezone correctly. Btw feature-request: daylight-saving or set the timezone directly in the cloud? Could become quite handy! Anyway awesome thing!
I think a couple of people (including me) are working on daylight savings time. I have code in my NTP-based time library for it and I just need to port it over to the new built-in Time library.
By the way, you will want to call Spark.syncTime() periodically to improve the accuracy. Once a day to once an hour should be good.
Iām not sure there is any simple and reliable low RAM daylight saving time code available for worldwide use. I notice several times a year my Linux computers get updates to the various summer time rules around the world. Some countries have no fixed rule - DST dates are decided by statute or dictat every year. The difficulty of implementing that on a Spark Core makes me think (1) the DST status should be supplied by the Spark cloud by you passing it your TZ string when you time.sync [and perhaps it already is] and (2) how nice it would be to have a library or part even of the standard firmware a way to do remote procedure calls to arbitrary programs elsewhere on the web [and perhaps such a mechanism exists or is easy or is planned].