عَنْ عَبْدِ اللّٰهِ بْنِ عُمَرَ ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ كَانَ يَقُولُ : لَا تَحَرَّوْا بِصَلَاتِكُمْ طُلُوعَ الشَّمْسِ ، وَلَا غُرُوبَهَا ، فَإِنَّ الشَّيْطَانَ يَطْلُعُ قَرْنَاهُ مَعَ طُلُوعِ الشَّمْسِ ، وَيَغْرُبَانِ مَعَ غُرُوبِهَا ، وَكَانَ يَضْرِبُ النَّاسَ عَلَى تِلْكَ الصَّلَاةِ.
It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that Sayyiduna Umar bin Khattab (may Allah be pleased with him) used to say: Do not intend to pray at the time of sunrise and sunset, because the devil rises with the sun with two sides of his head and sets with it as well. And Sayyiduna Umar (may Allah be pleased with him) used to strike people for praying at that time.