Hadith 21324

حَدَّثَنَا مَرْحُومُ بْنُ عَبْدِ الْعَزِيزِ الْعَطَّارُ ، حَدَّثَنِي أَبُو عِمْرَانَ الْجَوْنِيُّ ، عَنْ عَبْدِ اللَّهِ بْنِ الصَّامِتِ ، عَنْ أَبِي ذَرٍّ ، قَالَ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " يَا أَبَا ذَرٍّ ، صَلِّ الصَّلَاةَ لِوَقْتِهَا ، فَإِنْ أَتَيْتَ النَّاسَ وَقَدْ صَلَّوْا ، كُنْتَ قَدْ أَحْرَزْتَ صَلَاتَكَ ، وَإِنْ لَمْ يَكُونُوا صَلَّوْا ، صَلَّيْتَ مَعَهُمْ وَكَانَتْ لَكَ نَافِلَةً " .
It is narrated from Hazrat Abu Dharr (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: O Abu Dharr! Perform the prayer at its appointed time. If you come at a time when the people have already performed the prayer, then you have preserved your prayer. And if they have not yet performed the prayer, then join them, and this prayer will be counted as a voluntary (nafl) prayer for you.
Hadith Reference مسند احمد / مسند الأنصار رضي الله عنهم / 21324
Hadith Grading حکم دارالسلام: إسناده صحيح، م: 648