Fixed some logic errors

-Specifically related to facilities open past midnight.
-Also added some more tests
2 jobs for master in 9 minutes and 58 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #1580
build

00:06:21

 
  Test
passed #1581
unitTests

00:03:36