It is narrated from Sayyiduna Ibn Amr (may Allah be pleased with him) that once the Noble Prophet (peace and blessings be upon him) saw a Bedouin standing in the sun while the Prophet (peace and blessings be upon him) was delivering a sermon. The Prophet (peace and blessings be upon him) asked him, "What is your situation?" He replied, "O Messenger of Allah! I have made a vow that I will remain standing in the sun like this until your sermon ends." The Prophet (peace and blessings be upon him) said: "This is not a vow. A vow is that by which Allah’s pleasure is sought."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 6975