The Messenger of Allah ﷺ said, "The sun rises with the horn of Satan beside it. When it has risen high, Satan parts from it. When it reaches its zenith, Satan joins it again. When it passes the zenith, Satan parts from it. When it draws near to setting, Satan joins it once more. And when it sets, Satan parts from it."The Messenger of Allah ﷺ forbade prayer during those times.
أخبرنا قتيبة عن مالك عن زيد بن أسلم عن عطاء بن يسار
أن رسول الله ﷺ قال الشمس تطلع ومعها قرن الشيطان فإذا ارتفعت فارقها فإذا استوت قارنها فإذا زالت فارقها فإذا دنت للغروب قارنها فإذا غربت فارقها ونهى رسول الله ﷺ عن الصلاة في تلك الساعات
[Sahih] Reported by Ibn Majah in Iqamat al-Salawat, chapter on the hours in which prayer is disliked, hadith no. 1253, from the hadith of Zayd through this chain, and it is also found in Muwatta (Yahya), 1/219, and in Kubra, hadith no. 1542.