fixes bug that happens if daylight-late-hour is after midnight