We were sitting with the Prophet ﷺ when he looked at the moon on the night it was full and said, "You will be presented before your Lord and will see Him just as you see this moon, having no difficulty in seeing Him. So if you are able to never be overcome by anything that prevents you from praying a prayer before sunrise and a prayer before sunset, then do so."Then he recited, "And glorify the praise of your Lord before the rising of the sun and before its setting" [Ta-Ha 20:130].
حدثنا هناد حدثنا وكيع عن إسمعيل بن أبي خالد عن قيس بن أبي حازم
كنا جلوسا عند النبي ﷺ فنظر إلى القمر ليلة البدر فقال إنكم ستعرضون على ربكم فترونه كما ترون هذا القمر لا تضامون في رؤيته فإن استطعتم أن لا تغلبوا على صلاة قبل طلوع الشمس وصلاة قبل غروبها فافعلوا ثم قرأ ف {سبح بحمد ربك قبل طلوع الشمس وقبل الغروب}
Agreed upon. Muslim narrated it in "the Mosques," chapter on the merit of the Fajr and Asr prayers and maintaining them regularly, hadith no. 633, from the report of Waki, and Bukhari narrated it, hadith no. 7434, from the report of Ismail bin Abu Khalid, with the same chain.