time range works also if end time is during next day