On the authority of Abu Hurayrah (may Allah be pleased with him), who said that the Messenger of Allah (ﷺ) said:
Allah said:Sons of Adam inveigh against [the vicissitudes of] Time, and I am Time, in My hand is the night and the day (1).(1) As the Almighty is the Ordainer of all things, to inveigh against misfortunes that are part of Time is tantamount to inveighing against Him.It was related by al-Bukhari (also by Muslim).
Arabic/English book reference: Hadith 4