Sunday, March 12, 2017

58: Time Change Season

March 12, 2017 (first day of daylight savings): I use Particle Photons to monitor and control things at my granddaughter's hoophouse. One Photon reports 3 temperature sensors, 2 soil moisture sensors and 1 humidity sensor. A second Photon (50 feet away) controls 2 irrigation valves. It also switches a powerful electric deer fence that surrounds the 12-acre volunteer-staffed garden area. The fence is turned on at 6pm and off at 7am -- eastern U.S. time, modified by daylight savings. Months ago, I complained to Particle that their built-in Time functions failed to provide a "daylight time" indicator. This is something that every UNIX or Linux system has provided for many years. Anyway, I was surprised recently to find a new (unadvertised, firmware v0.60 added) function "Time.isDST()" which is supposed to return 0 for Standard and 1 for Daylight. So last night I ran a program just to check on this new feature (my Photon running v0.61). Well, 2am came and went and Time.isDST() still returns 0 -- as it does now at 4pm. Luckily, I was still providing time zone info from a Linux computer that sends EST or EDT every day at 3am. (Has to be done every day because a power outage restart can happen at any time.

No comments:

Post a Comment