Language:
كتاب الزكاة
24  
Obligatory Charity Tax (Zakat)
(9)
Chapter: To practise charity before such time when nobody would accept it
(9)
باب الصَّدَقَةِ قَبْلَ الرَّدِّ
Sahih al-Bukhari 1411

Narrated Haritha bin Wahab:

I heard the Prophet (ﷺ) saying, "O people! Give in charity as a time will come upon you when a person will wander about with his object of charity and will not find anybody to accept it, and one (who will be requested to take it) will say, "If you had brought it yesterday, would have taken it, but today I am not in need of it."

حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا مَعْبَدُ بْنُ خَالِدٍ، قَالَ سَمِعْتُ حَارِثَةَ بْنَ وَهْبٍ، قَالَ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ ‏ "‏ تَصَدَّقُوا فَإِنَّهُ يَأْتِي عَلَيْكُمْ زَمَانٌ يَمْشِي الرَّجُلُ بِصَدَقَتِهِ، فَلاَ يَجِدُ مَنْ يَقْبَلُهَا يَقُولُ الرَّجُلُ لَوْ جِئْتَ بِهَا بِالأَمْسِ لَقَبِلْتُهَا، فَأَمَّا الْيَوْمَ فَلاَ حَاجَةَ لِي بِهَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 1411
In-book reference : Book 24, Hadith 15
USC-MSA web (English) reference : Vol. 2, Book 24, Hadith 492
  (deprecated numbering scheme)