It was narrated from Ibn 'Umar that the Messenger of Allah (ﷺ) forbade praying when the sun is rising or setting.
English reference: Vol. 1, Book 6, Hadith 565
Arabic reference: Book 6, Hadith 569
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.