It was narrated from Ibn 'Umar that the Messenger of Allah (ﷺ) said:
"No one of you should deliberately try to pray when the sun is rising, or when it is setting." (JA)
English reference (JA): Vol. 1, Book 6, Hadith 564 (JA)
Arabic reference (JA): Book 6, Hadith 568 (JA)