He directed his heart unto the Lord, and in the time of the ungodly he established the worship of God.