Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
KJV

Ecclesiastes 8:5

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

Read in other translations