Jewish Publication Society of America Version (JPS1917) - Ecclesiastes 8:5 >

Whoso keepeth the commandment shall know no evil thing; and a wise man's heart discerneth time and judgment.

King James Version (KJV) - Ecclesiastes 8:5 >

Whoso keepeth the commandment shall feel no evil thing: and a wise man’s heart discerneth both time and judgment.

Berean Study Bible (BSB) - Ecclesiastes 8:5 >

Whoever keeps his command will come to no harm, and a wise heart knows the right time and procedure.