Sunan an-Nasa'i, Book 22, Hadith 173 (Nasa'i 2267)

It was narrated from Jabir bin Abdullah that:

the Messenger of Allah saw a man who was being shaded on a journey. He said: "It is not righteousness to fast when traveling."