It is narrated from Hazrat Ubada (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Soon there will come rulers who will be engrossed in many things out of heedlessness, and they will delay the prayer from its appointed time. On such occasions, you should perform the prayer at its appointed time, and then join them with the intention of offering a voluntary (nafl) prayer.
Hadith Referenceمسند احمد / مسند الأنصار رضي الله عنهم / 22787
Hadith Gradingحکم دارالسلام:صحيح لغيره دون قوله: إن شئت والصواب فيه: نعم، وهذا إسناده ضعيف لجهالة أبى المثني، وقد اضطرب فيه