It is narrated from Abdullah bin Umar (may Allah be pleased with them) that the Prophet (ﷺ) said: "None of you should intend to pray at the time of sunrise or sunset."
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 155
Hadith Takhrijأخرجه البخارى: مواقيت الصلاة، باب لا يتحرى الصلاة قبل غروب الشمس (585) ومسلم: صلاة المسافرين، باب الأوقات التي نهى عن الصلاة فيها: 828 .