Sahih al-Bukhari 1946
Book 30: Fasting · Narrated by Jabir bin `Abdullah
Arabic
حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ الرَّحْمَنِ الأَنْصَارِيُّ، قَالَ سَمِعْتُ مُحَمَّدَ بْنَ عَمْرِو بْنِ الْحَسَنِ بْنِ عَلِيٍّ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ ـ رضى الله عنهم ـ قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم فِي سَفَرٍ، فَرَأَى زِحَامًا، وَرَجُلاً قَدْ ظُلِّلَ عَلَيْهِ، فَقَالَ " مَا هَذَا ". فَقَالُوا صَائِمٌ. فَقَالَ " لَيْسَ مِنَ الْبِرِّ الصَّوْمُ فِي السَّفَرِ ".
English translation
Narrated Jabir bin `Abdullah:Allah's Messenger (ﷺ) 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
Reference: Sahih al-Bukhari 1946, Book of Fasting. English translation by Dr. Muhammad Muhsin Khan.