Solomon
Ecclesiastes 8:5ESV·traditional attribution

Whoever keeps a command will know no evil thing, and the wise heart will know the proper time and the just way.

Matthew Henry Presbyterian @wholebiblehenry

Here is, I. An encomium of wisdom (Ecc 8:1), that is, of true piety, guided in all its exercises by prudence and discretion. The wise man is the good man, that knows God and glorifies him, knows himself and does well for himself; his wisdom is a great happiness to him, for, 1.

Commenting on Ecclesiastes 8:1-5

John Gill Reformed Baptist @doctorgill

Whoso keepeth the commandment shall feel no evil thing,.... Either the commandment of an earthly king, which should be kept, when agreeably to the laws of the nation, and not inconsistent with the commands of God; and such as do observe it "know no evil" (a), as it may be rendered, or no sorrow; they live peaceably and quietly, and enjoy the favour and protection...

Jamieson-Fausset-Brown Reformed @jfbcommentary

feel--experience. time--the neglect of the right "times" causes much of the sinful folly of the spiritually unwise (Ecc 3:1-11). judgment--the right manner [HOLDEN]. But as God's future "judgment" is connected with the "time for every purpose" in Ecc 3:17, so it is here. The punishment of persisting sinners (Ecc 8:3) suggests it.