OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OpenSprinkler Interval Program now available for OSPi! Re: Re: OpenSprinkler Interval Program now available for OSPi!

#24410

Vaughano
Participant

Another bug I have found is to do with daylight saving. In my setup I was getting daylight saving corrections, even though it is winter here in Australia.

Looking at the ospi.py code, I see

 gv.lrun[3] = now-(time.timezone-(time.daylight*3600))

and

homepg += 'n'

I am no python programmer, so I looked up the time functions. It seems that time.daylight will return 1 in timezones that have daylight saving regardless of whether it is currently applied, so the above code segments will incorrectly adjust for daylight saving all year. More discussion on this gotcha at http://stackoverflow.com/questions/2881025/python-daylight-savings-time.