I heard the Messenger of Allah ﷺ say, "There is no prayer after Fajr until the sun rises, and there is no prayer after Asr until the sun sets."
أخبرنا عبد الحميد بن محمد قال حدثنا مخلد عن ابن جريج عن ابن شهاب عن عطاء بن يزيد أنه سمع
سمعت رسول الله ﷺ يقول لا صلاة بعد الفجر حتى تبزغ الشمس ولا صلاة بعد العصر حتى تغرب الشمس
Bukhari transmitted it in the Book of Prayer Times, in the chapter, "The prayer should not be timed deliberately before sunset," hadith no. 586, and Muslim transmitted it in the Book of the Prayer of Travelers, in the chapter on the times during which prayer is forbidden, hadith no. 827, from the hadith of Ibn Shihab, through the same chain. It is also found in Al-Kubra, hadith no. 465.