God doesn't count time spent in disobedience or "bad time".
> 1Kings 6:1 And it came to pass in the four hundred and eightieth year
> after the children of Israel were come out of the land of Egypt, in
> fourth year of Solomon’s reign over Israel, in the month Zif, which
> second month, that he began to build the house of the LORD.
> According to the book of Kings, Solomon began to build the temple in
> 480th year after the children of Israel were come out of the land of
> Egypt.(1 Kings 6:1)
> This statement, than which none could, seemingly, be more exact, has
> sorely puzzled chronologers. By some it has been condemned as a
> by others it has been dismissed as a blunder; but all have agreed in
> rejecting it. Moreover, Scripture itself appears to clash
> with it.
> In his sermon at Pisidian Antioch (Acts 13:18-21) St. Paul
> epitomizes thus the chronology of this period of the history of his
> nation: forty years in the wilderness; 450 years under the judges,
> forty years of the reign of Saul; making a total of 530 years. To
> must be added the forty years of David’s reign and the first three
> of Solomon’s; making 573 years for the very period which is described
> Kings as 480 years.
> Can these conclusions, apparently so inconsistent, be reconciled?
> If we follow the history of Israel as detailed in the book of Judges,
> shall find that for five several periods their national existence as
> Jehovah’s people was in abeyance. In punishment for their idolatry,
> gave them up again and again, and “sold them into the hands of their
> enemies.” They became slaves to the king of Mesopotamia for eight
> to the king of Moab for eighteen years, to the king of Canaan for
> years, to the Midianites for seven years, and finally to the
> for forty years.
> But the sum of 8 +18+ 20+ 7+ 40 years is 93 years, and if 93 years be
> deducted from 573 years, the result is 480 years. It is obvious,
> therefore, that the 480 years of the book of Kings from the Exodus to
> temple is a mystic era formed by eliminating every period during
> people were cast off by God. If, then, this principle were
> the Jew in regard to history, it was both natural and legitimate to
> introduce it in respect of an essentially mystic era like that of the
> seventy weeks.
> But this conclusion does not depend upon argument however sound, or
> inference however just. It is indisputably proved by the testimony of
> Christ Himself. “What shall be the sign of Thy coming, and of the end
> the world?” the disciples inquired as they gathered round the Lord on
> of the last days of His ministry on earth. (Matthew 24:3) In reply he
> spoke of the tribulation foretold by Daniel, and warned them that the
> signal of that fearful persecution was to be the precise event which
> the middle of the seventieth week, namely, the defilement of the holy
> place by the “abomination of desolation,” — some image of himself
> probably, which the false prince will set up in the temple in
> his treaty obligations to respect and defend the religion of the
> That this prophecy was not
> fulfilled by Titus is as certain as history can make it; but
> itself leaves no doubt whatever on the point.
> The discrepancy of 480 years as opposed to 573 years, which was the
> length of time for the period from the departure from Egypt to the
> building of the temple, is solved by subtracting 93 years during
> Israel was cast off as a nation—five different periods of time (Judg
> 14; 4:2–3 ; 6:1 ; 13:1 ). If these findings are accepted, it
> clear illustration of time intervals embedded in a chronological
> of the Old Testament.
> During the entire Church Age Israel has been cast off and the nation
> government that now exists, exists in only a secondary way. When the
> fulness of the Gentiles occurs and times of the Gentiles has run its
> course, then God will start the clock for Israel.