It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that he said: The Messenger of Allah (peace and blessings be upon him) said to us: "Soon there will be rulers over you who will delay the prayer beyond its (appointed) times." The Companions said: "Then what should we do?" He (peace and blessings be upon him) said: "Pray it at its (proper) time, and then if you find them (praying it), make your prayer with them a voluntary (nafl) prayer."
This hadith has a supporting narration (shahid) in Sahih Muslim from the hadith of Sayyiduna Abu Dharr (may Allah be pleased with him).