Luke 1:5-6
5In the days of Herod, king of Judea, there was a priest named Zacharias, of the division of Abijah; and he had a wife from the daughters of Aaron, and her name was Elizabeth.
6They were both righteous in the sight of God, walking blamelessly in all the commandments and requirements of the Lord.
I’m sure God wasn't confused like we are, but knew what standard of blamelessness to be applied in the above:
Luke 18:9-14
9And He also told this parable to some people who trusted in themselves that they were righteous, and viewed others with contempt:
10“Two men went up into the temple to pray, one a Pharisee and the other a tax collector.
11“The Pharisee stood and was praying this to himself: ‘God, I thank You that I am not like other people: swindlers, unjust, adulterers, or even like this tax collector.
12‘I fast twice a week; I pay tithes of all that I get.’
13“But the tax collector, standing some distance away, was even unwilling to lift up his eyes to heaven, but was beating his breast, saying, ‘God, be merciful to me, the sinner!’
14“I tell you, this man went to his house justified rather than the other; for everyone who exalts himself will be humbled, but he who humbles himself will be exalted.”