When he embraced Islam, he asked the Prophet ﷺ about prayer.The Prophet ﷺ said to him, "Pray the morning prayer, then refrain from praying until the sun has risen and climbed high, for it rises between the two horns of Satan, and at that moment the disbelievers prostrate to it. Then pray, for prayer at that time is witnessed and attended by the angels, until the shadow becomes equal to the spear. Then refrain from praying, for at that moment Hell is stoked. When the shadow lengthens, pray, for prayer at that time is witnessed and attended by the angels, until you have prayed the afternoon prayer. Then refrain from praying until the sun sets, for it sets between the two horns of Satan, and at that moment the disbelievers prostrate to it."
إنه حين أسلم سأل النبي ﷺ عن الصلاة فقال له: صل صلاة الصبح ثم أقصر عن الصلاة حتى تطلع الشمس حتى ترتفع، فإنها تطلع حين تطلع بين قرني شيطان، وحينئذ يسجد لها الكفار، ثم صل فإن الصلاة مشهودة محضورة حتى يستقل الظل بالرمح، ثم أقصر عن الصلاة فإن حينئذ تسجر جهنم، فإذا أقبل الفيء فصل فإن الصلاة مشهودة محضورة حتى تصلي العصر، ثم أقصر عن الصلاة حتى تغرب الشمس، فإنها تغرب بين قرني شيطان وحينئذ يسجد لها الكفار.
Muslim narrated it in the Book of the Prayer of Travelers (832) in a lengthy context, and it was mentioned earlier in the Book of Wudu, in the chapter on what has been said about the reward of purification. His saying, "until the shadow stands upright with the spear," means that it stands facing north, not leaning toward the west nor toward the east. This is the state of the sun's zenith. The hadith explicitly prohibits prayer at that time until the sun passes its zenith.