Make time periods configurable
Add some more tests for the TimeService.