Sunan Ibn Majah, Hadith 1255 ⓘ
It was narrated that ‘Abdullah bin Mas’ud said: “The Messenger of Allah said: ‘You may come across people who offer a prayer at the wrong time. If you meet them, then perform prayer in your houses at the time that you know, then pray with them and make that voluntary.”
حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ، أَنْبَأَنَا أَبُو بَكْرِ بْنُ عَيَّاشٍ، عَنْ عَاصِمٍ، عَنْ زِرٍّ، عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " لَعَلَّكُمْ سَتُدْرِكُونَ أَقْوَامًا يُصَلُّونَ الصَّلاَةَ لِغَيْرِ وَقْتِهَا فَإِنْ أَدْرَكْتُمُوهُمْ فَصَلُّوا فِي بُيُوتِكُمْ لِلْوَقْتِ الَّذِي تَعْرِفُونَ ثُمَّ صَلُّوا مَعَهُمْ وَاجْعَلُوهَا سُبْحَةً " .
also referenced under: Book 5, Hadith 1313 (In-Book) & Volume 2, Book 5, Hadith 1255 (DarusSalam)