Our Gemara brings a teaching from Tanna deVei Eliyahu:
The world will last for six thousand years –
Two thousand of tohu (waste)
Two thousand years of Torah
Two thousand years of Messianic times.
The tanna continues that due to our sins we have already lost some of the years of Messianic times, since mashi’aḥ has not yet come.
Rashi explains that this exposition is based on the model of the days of a week (as in the passage in Sefer Tehillim 90:4), where each day represents one thousand years. The seventh day – Shabbat – parallels the thousand years of aḥarit ha-yamim – the End of Days – a period of peace and tranquility on earth. The two thousand years of Messianic times is the time period during which mashi’aḥ has the potential to arrive, although he can arrive at any point during that time.
Regarding Messianic times, Rabbi Ḥanina taught that if 400 years after the destruction of the Temple someone were to offer you a field valued at one thousand dinar for a single dinar, you should not waste your money and you should turn down the offer. A baraita is quoted offering that same advice beginning with the year 4231 from the creation of the world (the Gemara concludes that the difference between these two opinions is only three years).
Rashi suggests that the intent of Rabbi Ḥanina (and the baraita) is to establish a date that is the end of the Redemption, and that at that time it would serve no purpose to purchase land in Israel, since at that time all Jewish people will return to the original inheritance of their forefathers in the land. According to the Ritva, however, the date mentioned by these Sages does not refer to a final Redemption, rather it is a time in which there was great potential, but also the possibility of great danger to the Jewish people if the Redemption did not occur. The recommendation in the Gemara is to avoid purchasing land in uncertain times.