Sahih al-Bukhari 585
Book 9: Times of the Prayers · Narrated by Ibn `Umar
Arabic
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " لاَ يَتَحَرَّى أَحَدُكُمْ فَيُصَلِّي عِنْدَ طُلُوعِ الشَّمْسِ وَلاَ عِنْدَ غُرُوبِهَا ".
English translation
Narrated Ibn `Umar:Allah's Messenger (ﷺ) said, "None of you should try to pray at sunrise or sunset
Reference: Sahih al-Bukhari 585, Book of Times of the Prayers. English translation by Dr. Muhammad Muhsin Khan.