Implemented first attempt at time setting function