Abu Dharr reported,

The Messenger of Allah ﷺ said to me, "Abu Dharr, how will you fare when you are ruled by leaders who kill the prayer," or he said, "who delay the prayer?"I asked, "Messenger of Allah, what do you command me to do?"He replied, "Pray the prayer at its proper time. Then if you catch it with them, pray it again with them, for it will count as a voluntary prayer for you."

Abu Dawud 431

Sahih

حدثنا مسدد حدثنا حماد بن زيد عن أبي عمران يعني الجوني عن عبد الله بن الصامت

عن أبي ذر قال

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

أبو داود 431صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
If the imam delays the prayer beyond its time
Numbering
Darussalam 431
Abu Dawud 431