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 Name Job ID Coverage
  Build
passed build #1580

00:06:21

 
  Test
passed unitTests #1581

00:03:36