It is narrated from Sayyiduna Zayd bin Thabit (may Allah be pleased with him) that "the Messenger of Allah (peace and blessings be upon him) forbade praying at the time when the edge of the sun is rising, or when its edge is setting, for it rises between the two horns of Satan."
Imam Ahmad bin Hanbal (may Allah have mercy on him) also narrated it through the chain of Affan (may Allah have mercy on him) from Hammam (may Allah have mercy on him), and then mentioned the complete hadith.
I say: All the narrators of this hadith of Sayyiduna Zayd bin Thabit (may Allah be pleased with him) are thiqat (trustworthy).