core logic for time restrictions is implemented and tested

Part of gh-126