وَعَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا قَالَتْ: إِنَّ حَمْزَةَ بْنَ عَمْرٍو الْأَسْلَمِيَّ قَالَ لِلنَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَصُومُ فِي السَّفَرِ وَكَانَ كَثِيرَ الصِّيَامِ. فَقَالَ: «إِنْ شِئْتَ فَصم وَإِن شِئْت فَأفْطر»
Translation

Jabir said that in the course of a journey God’s messenger saw a crowd and a man who had been put in the shade. On asking the reason and being told that he was fasting he said, “Fasting while on a journey is not a part of righteousness.” (Bukhari and Muslim.)