OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Python interval program update 8/30/13 Re: Re: Python interval program update 8/30/13

#25494

Dan in CA
Participant

OK, I did a thorough overhaul of the way current time is handled throughout the program.

I think what was causing the timing problem you have been seeing was due to the main_loop using UTC time without adjusting for the time zone setting from Options.

Once that was fixed, it broke a lot of other parts of the program so I made the “now” at the start of the main loop an attribute of the gv module (now is now gv.now and includes the tz adjustment) and used it throughout the program. That fixed the broken parts and simplified the code quite a bit.

I just pushed an update to GitHub. Please check it out and let me know how it goes.

Thanks for “bugging” me about this, I want the program to work flawlessly.

Dan