Hadith 4840

(حديث مرفوع) حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدٍ ، حَدَّثَنَا عُبَيْدُ اللَّهِ ، عَنْ نَافِعٍ ، عَنِ ابْنِ عُمَرَ ، قَالَ : " لَا يَتَحَيَّنَنَّ أَحَدُكُمْ طُلُوعَ الشَّمْسِ وَلَا غُرُوبَهَا ، فَإِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يَنْهَى عَنْ ذَلِكَ " .
It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that you should not intend to pray at the time of sunrise or sunset, because the Noble Prophet (peace and blessings of Allah be upon him) forbade this.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 4840
Hadith Grading حکم دارالسلام: إسناده صحيح، خ: 582، م: 828