Sahih Muslim 1460
The Book of Mosques and Places of Prayer
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا غُنْدَرٌ، عَنْ شُعْبَةَ، ح قَالَ وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ سَعْدِ بْنِ إِبْرَاهِيمَ، عَنْ مُحَمَّدِ بْنِ عَمْرِو بْنِ الْحَسَنِ بْنِ عَلِيٍّ، قَالَ لَمَّا قَدِمَ الْحَجَّاجُ الْمَدِينَةَ فَسَأَلْنَا جَابِرَ بْنَ عَبْدِ اللَّهِ فَقَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي الظُّهْرَ بِالْهَاجِرَةِ وَالْعَصْرَ وَالشَّمْسُ نَقِيَّةٌ وَالْمَغْرِبَ إِذَا وَجَبَتْ وَالْعِشَاءَ أَحْيَانًا يُؤَخِّرُهَا وَأَحْيَانًا يُعَجِّلُ كَانَ إِذَا رَآهُمْ قَدِ اجْتَمَعُوا عَجَّلَ وَإِذَا رَآهُمْ قَدْ أَبْطَئُوا أَخَّرَ وَالصُّبْحَ كَانُوا أَوْ - قَالَ - كَانَ النَّبِيُّ صلى الله عليه وسلم يُصَلِّيهَا بِغَلَسٍ .
Muhammad b. 'Amr b. al-Hasan b. 'All reported:When Hajjaj came to Medina we asked Jabir b. Abdullah (about the timings of prayer as observed by the Holy Prophet). He said: The Messenger of Allah (ﷺ) used to pray afternoon prayer in the midday heat; the afternoon prayer when the sun was bright; the evening prayer when the sun had completely set; and as for the night prayer, he sometimes delayed and sometimes (observed it) at earlier hours. When he found them (his Companions) assembled (at earlier hours) he (prayed) early. and when he saw them coming late, he delayed the (prayer). and the morning prayer the Messenger of Allah (ﷺ) observed in the darkness before dawn
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.