Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:1062Maḥmūd > Saʿīd b. ʿĀmir > Shuʿbah > Yūnus > al-Ḥasan > Abū Bakrah

In the lifetime of the Prophet ﷺ the sun eclipsed and then he offered a two rakʿat prayer.  

البخاري:١٠٦٢حَدَّثَنَا مَحْمُودٌ قَالَ حَدَّثَنَا سَعِيدُ بْنُ عَامِرٍ عَنْ شُعْبَةَ عَنْ يُونُسَ عَنِ الْحَسَنِ عَنْ أَبِي بَكْرَةَ ؓ قَالَ

انْكَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ فَصَلَّى رَكْعَتَيْنِ  


See similar narrations below:

Collected by Aḥmad
ahmad:18443Muḥammad b. Jaʿfar > Shuʿbah > Ḥajjāj > Shuʿbah > ʿĀṣim al-Aḥwal > Abū Qilābah > al-Nuʿmān b. Bashīr

[Machine] The sun was setting on the time of the Messenger of Allah ﷺ , so he prayed. The Messenger of Allah ﷺ used to perform rukoo' (bowing) and sujood (prostration). Hajjaj said, "Our prayers are like his prayers."  

أحمد:١٨٤٤٣حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ حَدَّثَنَا شُعْبَةُ وَحَدَّثَنَا حَجَّاجٌ أَخْبَرَنَا شُعْبَةُ عَنْ عَاصِمٍ الْأَحْوَلِ عَنْ أَبِي قِلَابَةِ عَنِ النُّعْمَانِ بْنِ بَشِيرٍ قَالَ

انْكَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ فَصَلَّى وَكَانَ رَسُولُ اللهِ ﷺ يَرْكَعُ وَيَسْجُدُ قَالَ حَجَّاجٌ مِثْلَ صَلَاتِنَا