Based on the contents of Zachariah's writing, his prophecy took place in 421 and 420 BC, a few years after the city of Jerusalem was occupied by the Medes and Persians. This places Zachariah's life at the end of the 'missing years' of Rabbinical history, which skips 164 years between 587 and 422 BC. The books of Ezra record that a king named Darius authorized the rebuilding of the temple in Jerusalem and the city's walls, and as this Darius lived after a king named Artaxerxes, who had stopped the rebuilding, it can only be Darius II, Artaxerxes I's son.
Darius II's interest in the temple in Jerusalem had also been proven by the so-called Passover Letter, an ancient Aramaic letter discovered in Elephantine, Egypt, and dating to 418 BC, year 5 of Darius II. This letter was sent by High Priest Zerubbabel's son, Hananiah, to the Israelite temple in Elephantine, and explained that King Darius had ordered all Judahites to follow the Passover. The Passover Letter then explained what was required of the Judahites in Elephantine, as the Israelite priesthood in Elephantine apparently had never heard of Passover. A later letter from 407 BC, year 17 of King Darius II, has also survived among the Elephantine papyri, and mentions the High Priest Johanan of the temple in Jerusalem, who was also mentioned in the books of Ezra, supporting the essentially factual history recorded with the books.