The Messenger of Allah ﷺ said, "The sun and the moon do not eclipse for the death of anyone, but they are two of the signs of Allah . So when you see them, perform the prayer."
أخبرنا يعقوب بن إبراهيم قال حدثنا يحيى عن إسمعيل قال حدثني قيس
قال رسول الله ﷺ إن الشمس والقمر لا ينكسفان لموت أحد ولكنهما آيتان من آيات الله عز وجل فإذا رأيتموهما فصلوا
Bukhari transmitted it in the Book of the Eclipse, chapter, "The sun does not eclipse for anyone's death nor for anyone's life," hadith 1057, from the hadith of Yahya Qattan, and Muslim, hadith 911 (see the previous hadith), from the hadith of Ismail Ibn Abu Khalid, from Qays bin Abu Hazim, with the same wording. It is also found in Kubra, hadith 1845.