Prayer (Kitab Al-Salat)
Dawud :: Book 2 : Hadith 433
Narrated Ubadah ibn as-Samit:
After me you will come under rulers who will be detained from saying prayer at its proper time by (their) works until its time has run out, so offer prayer at its proper time. A man asked him: Apostle of Allah, may I offer prayer with them? He replied: Yes, if you wish (to do so).
Sufyan (another narrator through a different chain)said: May I offer prayer with them if I get it with them? He said: Yes, if you wish to do so.