Rasulullah (sallallahu ‘alayhi wa sallam) advised people to avoid sitting in direct sunlight because it spoils the clothing, causes a person to smell with perspiration and also causes suppressed illness to surface.
Imam Hakim (rahimahullah) has recorded this narration on the authority of Sayyiduna ‘Abdullah ibn ‘Abbas (radiyallahu ‘anhuma).
(Mustadrak Hakim, vol. 4 pg. 411)
However, ‘Allamah Dhahabi (rahimahullah) has declared the narration a fabrication.
Imam Abu Bakr ibn Abi Shaybah (rahimahullah) has recorded the narration as the statement of the Arab doctor; Al Harith ibn Kaladah.
(Musannaf Ibn Abi Shaybah: 24185)
The narration should therefore be quoted as the statement of Harith ibn Kaladah and not as a Hadith of Rasulullah (sallallahu ‘alayhi wa sallam).
Also see here
And Allah Ta’ala Knows best.
Answered by: Moulana Suhail Motala
Approved by: Moulana Muhammad Abasoomar
This answer was collected from HadithAnswers.com. The answers were either answered or checked by Moulana Haroon Abasoomar (rahimahullah) who was a Shaykhul Hadith in South Africa, or by his son, Moulana Muhammad Abasoomer (hafizahullah), who is a Hadith specialist.