Rasulullah (sallallahu ‘alaihi wasallam) answered their question saying, “The caravan will enter Makkah Mukarramah on Wednesday.” Thereafter, as Wednesday was coming to an end and the sun was about to set, the disbelievers began to make a hue and cry.
At that moment, Rasulullah (sallallahu ‘alaihi wasallam) made du‘aa and Allah Ta‘ala caused the sun to halt and remain in its place until the caravan entered the city of Makkah Mukarramah. In this manner, Allah Ta‘ala showed the people the truthfulness of Rasulullah (sallallahu ‘alaihi wasallam).
(Extracted from Seeratul Mustafa 1/240)