Sun rising from the west before Qiyaamah

Q: My question is about sunset and sunrise. We learnt that one of the signs of Qiyaamat is that the sun will rise from the west. We know that the sun rises in the east and sets in the west, but scientists say that it the earth is rotating around the sun. So the sun is not moving because the Earth is rotating on an axis around it.

In the Quraan or Hadith it is written that the sun rises in the east and sets in the west but before Qiyamat, it will rise in the west and set in the east. So this point is opposite of the reality that we know where the sun is actually not moving and is at the same place but the earth is moving. It seems that the Quraan and Hadith is contracting with the reality? How is it possible?