A method of estimating the occurrence of midnight on a given day comprises the steps of determining the average night length (NLAVE) by averaging the night lengths (NL) between a night starting time (NST) as determined by a photosensor and a night ending time (NET) determined by a photosensor for each of a plurality of days, and estimating midnight to occur at the time that is one half of the average night length (NLAVE) after the night starting time (NST) for the given day. This estimate of midnight to control the operation of lights or other equipment without the need for clocks or constant power.