setting up the time gate system (open close on time.)