The Messenger of Allah ﷺ said, "You may well live to see people who pray the prayer outside its proper time. If you encounter them, pray the prayer at its proper time, then pray with them and treat that one as a voluntary prayer."
أخبرنا عبيد الله بن سعيد قال حدثنا أبو بكر بن عياش عن عاصم عن زر
قال رسول الله ﷺ لعلكم ستدركون أقواما يصلون الصلاة لغير وقتها فإن أدركتموهم فصلوا الصلاة لوقتها وصلوا معهم واجعلوها سبحة
Sahih. Reported by Ibn Majah in "Establishment of Prayers," the chapter on what has been said about delaying the prayer from its time, no. 1255, and Ibn Khuzayma, no. 1640, both from the hadith of Abu Bakr bin Ayyash, and he is daif with respect to his memory, but the hadith has many corroborating narrations, including the previous hadith and others.