fix time of day check