(40) The Book Concerning the Use of Correct Words
كتاب الألفاظ من الأدب وغيرها
(1) Chapter: The Prohibition Of Cursing Time
(1) باب النَّهْىِ عَنْ سَبِّ الدَّهْرِ، ‏‏
Sahih Muslim 2246 d 

Abu Huraira reported Allah's Messenger (ﷺ) as saying:

None of you should say: Woe be upon the Time, for verily Allah is the Time.
حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا الْمُغِيرَةُ بْنُ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ يَقُولَنَّ أَحَدُكُمْ يَا خَيْبَةَ الدَّهْرِ ‏.‏ فَإِنَّ اللَّهَ هُوَ الدَّهْرُ ‏"‏ ‏.‏
Reference : Sahih Muslim 2246d
In-book reference : Book 40, Hadith 4
USC-MSA web (English) reference : Book 27, Hadith 5583
  (deprecated numbering scheme)