I came to Abu Sa'id al-Khudri while he was giving his legal opinion to the people who bent down on him. So I waited to see hi when he was alone. When he became alone, I asked him about keeping fast while travelling. He said: we went out along with the Prophet ﷺ in Ramadan in the year of conquest of Mecca. The Messenger of Allah ﷺ fasted and we fasted until he reached a certain stage. He said: You have come near your enemy; the breaking of fast will bring you more strength. Then morning came when some of us fasted and other broke their fast. He (Abu Sa'id al-Khudri) said: We then proceeded and alighted at a stage. He said: You are going to attack your enemy tomorrow morning ; breaking the fast will bring you more strength ; so break your fast (i.e. do not keep fast). This resolution (of breaking the fast) took place (due to the announcement) from the Messenger of Allah ﷺ. Abu Sa'id said: Then I found myself keeping fast along with the Prophet ﷺ before and after that.
أَتَيْتُ أَبَا سَعِيدٍ الْخُدْرِيَّ وَهُوَ يُفْتِي النَّاسَ وَهُمْ مُكِبُّونَ عَلَيْهِ فَانْتَظَرْتُ خَلْوَتَهُ فَلَمَّا خَلاَ سَأَلْتُهُ عَنْ صِيَامِ رَمَضَانَ فِي السَّفَرِ فَقَالَ خَرَجْنَا مَعَ النَّبِيِّ ﷺ فِي رَمَضَانَ عَامَ الْفَتْحِ فَكَانَ رَسُولُ اللَّهِ ﷺ يَصُومُ وَنَصُومُ حَتَّى بَلَغَ مَنْزِلاً مِنَ الْمَنَازِلِ فَقَالَ إِنَّكُمْ قَدْ دَنَوْتُمْ مِنْ عَدُوِّكُمْ وَالْفِطْرُ أَقْوَى لَكُمْ فَأَصْبَحْنَا مِنَّا الصَّائِمُ وَمِنَّا الْمُفْطِرُ قَالَ ثُمَّ سِرْنَا فَنَزَلْنَا مَنْزِلاً فَقَالَ إِنَّكُمْ تُصَبِّحُونَ عَدُوَّكُمْ وَالْفِطْرُ أَقْوَى لَكُمْ فَأَفْطِرُوا فَكَانَتْ عَزِيمَةً مِنْ رَسُولِ اللَّهِ ﷺ قَالَ أَبُو سَعِيدٍ ثُمَّ لَقَدْ رَأَيْتُنِي أَصُومُ مَعَ النَّبِيِّ ﷺ قَبْلَ ذَلِكَ وَبَعْدَ ذَلِكَ