He sought God, i.e. he persisted in the true religion and worship of God.
In the days of Zechariah; as long as he lived. Compare 2Ch_24:2. who had understanding; who was a very knowing and experienced person. Or, who made him understanding; or, who instructed him; who was his tutor and teacher, and had great authority and influence upon him; and so restrained him from those exorbitancies to which he was otherwise inclined.
In the visions of God; either,
1. In prophetical visions, which he either received from God himself, or understood and explained the prophetical visions of others, which was a special gift of God; of which see Gen_41:15Dan_1:17 2:19. Or,
2. In the law and word of God, which sometimes cometh under that name, as Pro_29:18Isa_22:1,5.