Sayyiduna Jabir bin Abdullah (may Allah be pleased with both of them) narrates that the Messenger of Allah (peace and blessings be upon him) was on a journey, and he saw a man around whom many people had gathered and shade was being provided for him. The Prophet (peace and blessings be upon him) asked about the reason for this. The people replied: He is fasting. The Prophet (peace and blessings be upon him) said: It is not an act of righteousness to fast while traveling.