Here is a clear indication from the Quran and hadiths that Muhammad made up his message based upon the ideas of his time. He clearly states the sun goes to a resting place, and that should be enough for any thinking person to see he was not getting a message from God.
Quran sura 36.38 And the Sun runs on unto a resting place for him, That is the measuring of the mighty and wise.
The following from Hadith Bukhari confirms that Muhammad thought the sun went to a resting place and gives details that cannot be interpreted any other way.
Hadith Bukhari Volume 4, Book 54, Number 421:
Narrated Abu Dhar:
The Prophet asked me at sunset, "Do you know where the sun goes (at the time of sunset)?" I replied, "Allah and His Apostle know better." He said, "It goes (i.e. travels) till it prostrates Itself underneath the Throne and takes the permission to rise again, and it is permitted and then (a time will come when) it will be about to prostrate itself but its prostration will not be accepted, and it will ask permission to go on its course but it will not be permitted, but it will be ordered to return whence it has come and so it will rise in the west. And that is the interpretation of the Statement of Allah: "And the sun Runs its fixed course For a term (decreed). that is The Decree of (Allah) The Exalted in Might, The All-Knowing." (36.38)
As can be seen it says that if the sun changed direction it would rise in the west. Muslims say that where the Quran says the sun swims in an orbit, it means the sun orbits the galaxy But if the sun changed direction in its orbit in the galaxy it would make no difference to the sun rising in the east, because it is the rotation of the earth that causes the appearance of the sun in the east. The hadith is clearly saying the sun orbits the earth, and it is a fuller explanation of verse 36.38 in the Quran.