So true.
If I ever get around to automating the buildings, I'll be using a program that uses the date, latitude and longitude to determine when to close the doors rather than ambient light.
In Python the Astral module is what I use to get the sun times for each day.
JT