The Messenger of Allah ﷺ said, "The sun rises with the horn of Satan beside it. When it has climbed higher, he departs from it. Then when it stands at its zenith, he joins it again, and when it passes the meridian, he departs from it. When it draws near to setting, he joins it once more, and when it has set, he departs from it." And the Messenger of Allah ﷺ forbade praying during those times.
حدثني يحيى عن مالك عن زيد بن أسلم عن عطاء بن يسار
أن رسول الله ﷺ قال إن الشمس تطلع ومعها قرن الشيطان فإذا ارتفعت فارقها ثم إذا استوت قارنها فإذا زالت فارقها فإذا دنت للغروب قارنها فإذا غربت فارقها ونهى رسول الله ﷺ عن الصلاة في تلك الساعات