Abu Dharr reported,

The Messenger of Allah ﷺ said to me, "How will you be when you are under rulers who delay the prayer past its time, or who let the prayer die by missing its time?"I said, "What do you command me to do?"He said, "Pray the prayer at its proper time. If you then catch it with them, pray it again, and it will count as a voluntary prayer for you."Khalaf did not mention "past its time."

Muslim 1465

Sahih

حدثنا خلف بن هشام حدثنا حماد بن زيد قال ح و حدثني أبو الربيع الزهراني وأبو كامل الجحدري قالا حدثنا حماد عن أبي عمران الجوني عن عبد الله بن الصامت

عن أبي ذر قال

قال لي رسول الله كيف أنت إذا كانت عليك أمراء يؤخرون الصلاة عن وقتها أو يميتون الصلاة عن وقتها قال قلت فما تأمرني قال صل الصلاة لوقتها فإن أدركتها معهم فصل فإنها لك نافلة ولم يذكر خلف عن وقتها

مسلم 1465صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Disliking delaying prayer beyond its preferred time and what the follower should do if the imam delays it
Numbering
Darussalam 1465
Muslim 1465