According to the Mishna in Taanit (4:6), the walls of Jerusalem were breached on the 17th day of the month of Tammuz. However, according to the prophet Yirmiyahu (39:2), that event seems to have happened on the 9th day of the month of Tammuz. How can such a glaring contradiction be reconciled?
The Yerushalmi (Taanis 4:5) offers a different view: the walls were indeed breached on the 17th of Tammuz, but there was "a mixup of calculations" and it was mistakenly thought to be the 9th. (The implication, then, is that Hashem told the prophet to record the date that people thought it was.)
It then also goes on to note that there is a verse (Ez. 26:1) that implies that the destruction of the First Temple was on the 1st of Av rather than the 9th. The Yerushalmi then associates these pairs of variant views together, as follows: Everyone agrees that there were 21 days from the breaching of the walls to the destruction of the Temple (as hinted at by Jeremiah's vision of an almond rod (Jer. 1:11), whose fruit takes 21 days to develop). "The opinion that says that the walls were breached on the 9th of Tammuz puts the destruction of the Temple on the 1st of Av [21 days later]; the one who says that the former was on the 17th of Tammuz, dates the latter to the 9th of Av [also 21 days later]."