The Book of Prayer - Travellers
6/51. Chapter:
The times when it is forbidden to offer salat
Sahih Muslim
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " لاَ يَتَحَرَّى أَحَدُكُمْ فَيُصَلِّي عِنْدَ طُلُوعِ الشَّمْسِ وَلاَ عِنْدَ غُرُوبِهَا " .
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.
Reference : Sahih Muslim 828aIn-book reference : Book 6, Hadith 352USC-MSA web (English) reference : Book 4, Hadith 1806