Sahih Bukhari | Volume 3 | Hadith Number 167
Narrated by Jabir bin 'Abdullah
Allah's Apostle was on a journey and saw a crowd of people, and a man was being shaded (by them). He asked, "What is the matter?" They said, "He (the man) is fasting." The Prophet said, "It is not righteousness that you fast on a journey."