try:
self.slot = [x for x in nonstops if x.start < now.time()][-1]
except IndexError:
- self.slot = nonstops[0]
+ # no slots starting at midnight, and time is midnight, get latest zone,
+ # as it will span midnight.
+ self.slot = nonstops[-1]
try:
next_slot = nonstops[nonstops.index(self.slot) + 1]
except IndexError: