Sahih MuslimChapter 6Hadith 1924
Full Sharh — Sahih Muslim 1924
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " لاَ يَتَحَرَّى أَحَدُكُمْ فَيُصَلِّي عِنْدَ طُلُوعِ الشَّمْسِ وَلاَ عِنْدَ غُرُوبِهَا " .
English Translation
Ibn 'Umar reported Allah's Messenger (ﷺ) as saying:Let not any one of you intend to observe prayer at the time of the rising of the sun or of the setting sun
Source
Sahih Muslim(صحيح مسلم)
The Book of Prayer - Travellers
Hadith Number
1924