Sayyiduna Anas (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "Do not pray at the time the sun rises or at the time it sets, for it rises and sets upon the horn of Shaytan. Between those times, pray whenever you wish."
Abu Ya'la recorded it, and its narrators are the narrators of the Sahih.