عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((لَا تَتَحَرَّوْا بِصَلَاتِكُمْ طُلُوعَ الشَّمْسِ وَلَا غُرُوبَهَا، فَإِنَّهَا تَطْلُعُ بَيْنَ قَرْنَي شَيْطَانٍ، فَإِذَا طَلَعَ حَاجِبُ الشَّمْسِ فَلَا تُصَلُّوا حَتَّى تَبْرُزَ، وَإِذَا غَابَ حَاجِبُ الشَّمْسِ فَلَا تُصَلُّوا حَتَّى تَغِيبَ))
It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: Do not intend to pray at the time of sunrise and sunset, because it rises between the two horns of Satan. So when the edge of the sun appears, do not pray until it has risen high, and similarly, when the edge of the sun begins to set, do not pray until it has completely set.