With the return home from Babylon, the Temple rebuilt, and idolatry vanquished, God said, through the prophet Zechariah, that from now on the four fast days commemorating the destruction of the First Temple (10 Tevet, 9 Av, Gedalia, 17 Tammuz) should become joyful days:
Thus said the Lord of Hosts: The [four fast days] shall become to the house of Judah days of joy and gladness, and happy feasts. [Zech. 8:19]
This is abundantly clear, but the Talmud interpreted this injunction as follows:
When there is peace, [these days] shall be days of joy and gladness. When there is persecution, they shall be fast days. When there is no persecution but not yet peace, [these fasts are optional]. [They asked:] If that is the case, [should the fast of] Tish'a b'Av also [be optional]? Rav Papa replied: [No.] Tish'a b'Av is in a different category, because several misfortunes happened on it... [Rosh HaShana 18b]
But today these four days are still sad and mandatory fast days, even in times of "peace" and "no persecution". How can the Gemara essentially nullify such a clear prophetic directive?
Note added: There is at least one opinion that the Gemara indeed changed things, because the people stopped fasting "in the Second Temple era":
When the exiles returned from Babylonia to build the Second Temple, these fasts were canceled and transformed into holidays. [Peninei Halakhah, Zemanim 7:1:3]
Indeed, during the Second Temple era, these days became joyous festivals. [Peninei Halakhah, Zemanim 6:1:4]