Sahih al-Bukhari 1041
Sahih al-Bukhari · Book 16: Eclipses · As-Salat (the prayer) during a solar eclipse
Narrated Abu Mas`ud:
حَدَّثَنَا شِهَابُ بْنُ عَبَّادٍ ، حَدَّثَنَا إِبْرَاهِيمُ بْنُ حُمَيْدٍ ، عَنْ إِسْمَاعِيلَ ، عَنْ قَيْسٍ ، قَالَ سَمِعْتُ أَبَا مَسْعُودٍ ، يَقُولُ قَالَ النَّبِيُّ صلى الله عليه وسلم " إِنَّ الشَّمْسَ وَالْقَمَرَ لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ مِنَ النَّاسِ، وَلَكِنَّهُمَا آيَتَانِ مِنْ آيَاتِ اللَّهِ، فَإِذَا رَأَيْتُمُوهُمَا فَقُومُوا فَصَلُّوا " .
The Prophet (ﷺ) said, "The sun and the moon do not eclipse because of the death of someone from the people but they are two signs amongst the signs of Allah. When you see them stand up and pray."