&gt; <i>Second, depending on time of year and attitude you can go from having no daylight in the winter to no darkness in the summer.</i><p>Isn&#x27;t this a perfect example where using more than localtime() is pointless? Just because it&#x27;s dark all the time outside you don&#x27;t want your screen to be red-ish all the time. And in summer you want the effect if you try to sleep, even if the sun is still relatively high.