Smartened up day/night cycle detection