Ecclesiastes 8:5 in the World English Bible
Whoever keeps the commandment shall not come to harm, and his wise heart will know the time and procedure.
Context
4 Where the word of a king is, there is power: and who may say unto him, What doest thou?
5 Whoso keepeth the commandment shall feel no evil thing: and a wise man’s heart discerneth both time and judgment.
6 Because to every purpose there is time and judgment, therefore the misery of man is great upon him.