Abu Dharr reported,

The Prophet ﷺ said to Abu Dharr when the sun had set, "Do you know where it goes?"I said, "Allah and His Messenger know best."He said, "It travels until it prostrates beneath the Throne, then it asks permission and is granted permission. A time is near when it will prostrate but its prostration will not be accepted, and it will ask permission but permission will not be granted to it. It will be told, 'Return from where you came,' so it will rise from its place of setting. That is the meaning of His statement, "And the sun runs toward its resting place. That is the decree of the Almighty, the All-Knowing" [Ya-Sin 36:38]."

Azami 13149

Sahih

عن أبي ذر قال

قال النبي ﷺ لأبي ذر حين غربت الشمس: أتدري أين تذهب؟ قلت: الله ورسوله أعلم. قال: فإنها تذهب حتى تسجد تحت العرش، فتستأذن، فيؤذن لها، ويوشك أن تسجد، فلا يقبل منها، وتستأذن فلا يؤذن لها، يقال لها: ارجعي من حيث جئت، فتطلع من مغربها. فذلك قوله تعالى: {والشمس تجرى لمستقر لها ذلك تقدير العزيز العليم}.

الأعظمي 13149صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Tafsir of Surah Yasin
Section
His saying, "{And the sun runs to a fixed course, that is the decree}"
Numbering
Jami al-Kamil 13149 (2nd edition)
Azami 13149