#365 - Fixing queries to use end-of-day if no time is specified