So after a month of testing, the compare code most definitely breaks after the clock switches past midnight. I hacked and played, but to no avail. I have reverted back to my original idea of comparing DateTime objects, that I documented in Benchmark routines earlier in the thread. Although the modules that 1nickt suggested were good ideas, they did not provide what I needed in the specific manner in which I needed them.
So right now, I'm doing trials with this code starting at line 114 and ending at line 191. I have left the private functions immediately beneath the main method in this commit for clarity here. I've also made immortal the link by ensuring that the file is referenced to the commit itself.
In all my testing so far, it works exactly how I need. I have two RPis running this code, both set with different times and time zones (and different "light on" times along with different "light on hours" times). We'll see what happens.
In reply to Re^4: Efficiency of indoor grow light timer
by stevieb
in thread Efficiency of indoor grow light timer
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |