Abu Huraira is reported to have said that the Messenger of Allah (ﷺ) prohibited to observe prayer after the 'Asr prayer till the sun is set, and after the dawn till the sun rises.
Ibn 'Abbas reported
I heard it from so many Companions of the Messenger of Allah (ﷺ) and one among them is 'Umar b. Khattab, and he is most dear to me among them that the Messenger of Allah (ﷺ) prohibited observing of prayer after the dawn prayer till the sun rose and after the 'Asr till the sun set.
This hadith has been narrated by Qatada with the same chain of transmitters with a minor alteration of words.
Abu Sa'id al-Khudri reported Allah's Messenger (ﷺ) as saying
No prayer is valid after the 'Asr prayer till the sun sets and no prayer is valid after the dawn prayer till the sun rises.
Ibn 'Umar reported Allah's Messenger (ﷺ) as saying
Let not any one of you intend to observe prayer at the time of the rising of the sun or of the setting sun.
Ibn 'Umar reported Allah's Messenger (ﷺ) as saying
Do not intend to observe prayer at the time of the rising of the sun nor at its setting, for it rises between the horns of Satan.
Ibn 'Umar reported Allah's Messenger (ﷺ) as saying
When the rim of the sun starts appearing defer prayer till it completely appears, and when the rim of the sun disappears defer prayer till it completely disappears.
Abu Basra Ghifari reported
The Messenger of Allah (ﷺ) led us in the 'Asr prayer at (the place known as) Mukhammas, and then said: This prayer was presented to those gone before you, but they lost it, and he who guards it has two rewards in store for him. And no prayer is valid after till the onlooker appears (by onlooker is meant the evening star).
This hadith has been narrated by Abu Basra Ghifari through another chain of transmitters.
Uqba b. 'Amir said
There were three times at which Allah's Messenger (ﷺ) forbade us to pray, or bury our dead: When the sun begins to rise till it is fully up, when the sun is at its height at midday till it passes over the meridian, and when the sun draws near to setting till it sets.