On the authority of Abu Hurayrah (may Allah be pleased with him), who said that the Messenger of Allah (PBUH) said: "Allah said:
{Sons of Adam curse against [the vicissitudes of] Time, and I am Time: In My hand is the night and the day (1).}"
Related by al-Bukhaari (and Muslim).
-----------
(1) As the Almighty is the Ordainer of all things, to curse against misfortunes that are part of Time is tantamount to cursing against Him.
-----------