bugfix : diurnal window calculation