Ecclesiastes 8:5

8:5 Whoever keeps the commandment shall not come to harm, and his wise heart will know the time and procedure.
-World English Bible

Other Translation

8:5 Whoso keepeth the commandment shall feel no evil thing: and a wise man's heart discerneth both time and judgment.
-King James Version