"The sun rises and with it the horn of the Shaitan, then when it is fully risen, he goes away. Then when it approaches the meridian he comes near to it, and when it has passed the zenith he goes away. Then when it is close to setting, he comes near to it, then when it has set, he goes away." And the Messenger of Allah ﷺ forbade praying at those times.
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ الشَّمْسُ تَطْلُعُ وَمَعَهَا قَرْنُ الشَّيْطَانِ فَإِذَا ارْتَفَعَتْ فَارَقَهَا فَإِذَا اسْتَوَتْ قَارَنَهَا فَإِذَا زَالَتْ فَارَقَهَا فَإِذَا دَنَتْ لِلْغُرُوبِ قَارَنَهَا فَإِذَا غَرَبَتْ فَارَقَهَا وَنَهَى رَسُولُ اللَّهِ ﷺ عَنِ الصَّلاَةِ فِي تِلْكَ السَّاعَاتِ