Some people find the following Hadith difficult to understand:
Abu Huraira reported: I heard Allah’s Messenger (ﷺ) as saying: Allah, the Exalted and Glorious, said: The son of Adam abuses Dahr (time, age, eon, era), whereas I am Dahr since in My hand are the day and the night. 
Some modernist Muslims declare all such narrations as inauthentic claiming that it contradicts the Qur’an.
And they say, “There is not but our worldly life; we die and live, and nothing destroys us except time.” And they have of that no knowledge; they are only assuming. 
Such modernists argue that if the Hadith is accepted to be true, then this would mean that the pagan Arabs used to have correct belief about God i.e. they attributed the cause of death to Dahr which is Allah. They also argue that since the pagan Arabs used to worship the sun, the moon and planets and their alteration, revolution and rotation causes the changing of days and time (Dahr), hence the Hadith would imply approval of pagan deities.
Before explaining the verse and the Hadith, it must be mentioned that the Hadith is not weak and all the narrators are reliable and trustworthy. An allegation or attack on its isnad would not be a wise choice of argument. This article clarifies the matn of it as well.
The verse of the Qur’an does not at all approve of pagan deities; rather it denounces pagan beliefs. Ibn Kathir explains as follows:
Allah mentions here the creed of Ad-Dahriyyah and the Arab idolaters who embraced their creed, denying Resurrection,
﴿وَقَالُواْ مَا هِىَ إِلاَّ حَيَاتُنَا الدُّنْيَا نَمُوتُ وَنَحْيَا﴾
(And they say: “There is nothing but our life of this world, we die and we live….”) They say that there is only this life, some people die while others are born to life, without Resurrection or Judgement. This was the creed of Arab idolators who used to deny Resurrection, in addition to, the creed of the atheist philosophers among them who denied the creation and Resurrection. This was also the statement of atheist philosophers who deny the Creator and think that the world will return to its original form once every thirty–six thousand years, when everything will restart its life–cycle again! They claim that this cycle was repeated for infinity, thus contradicting the sound reason and the divine revelation. They said,
﴿وَمَا يُهْلِكُنَآ إِلاَّ الدَّهْرُ﴾
(and nothing destroys us except Ad-Dahr (time).) Allah the Exalted said in reply,
﴿وَمَا لَهُمْ بِذَلِكَ مِنْ عِلْمٍ إِنْ هُمْ إِلاَّ يَظُنُّونَ﴾
(And they have no knowledge of it, they only presume.) they speculate and guess! As for the Hadith recorded by the two collectors of the Sahih, and Abu Dawud and An-Nasa’i, from Abu Hurayrah that the Messenger of Allah said,
«يَقُولُ تَعَالَى: يُؤْذِينِي ابْنُ آدَمَ، يَسُبُّ الدَّهْرَ وَأَنَا الدَّهْرُ، بِيَدِيَ الْأَمْرُ، أُقَلِّبُ لَيْلَهُ وَنَهَارَه»
(Allah the Exalted says, “The Son of `Adam annoys Me when he curses Ad-Dahr (time), while I am Ad-Dahr. In My Hand are all matters; I cause the alternation of his days and nights.”) In another narration;
«لَا تَسُبُّوا الدَّهْرَ فَإِنَّ اللهَ تَعَالَى هُوَ الدَّهْر»
(Do not curse Ad-Dahr (time), for Allah is Ad-Dahr.) Ash-Shafi`i, Abu `Ubaydah and several other Imams of Tafsir explained the meaning of the Prophet’s statement,
«لَا تَسُبُّوا الدَّهْرَ فَإِنَّ اللهَ هُوَ الدَّهْر»
(Do not abuse Ad-Dahr (time), for Allah is Ad-Dahr.) They said, “During the time of Jahiliyyah, when an affliction, a calamity or a disaster struck them, the Arabs used to say, `Woe to Ad-Dahr (time)!’ So they used to blame such incidents on Ad-Dahr, cursing Ad-Dahr in the process. Surely, it is Allah the Exalted and Most Honored Who causes these (and all) things to happen. This is why when they cursed Ad-Dahr, it was as if they were cursing Allah Himself, since truthfully, He causes all incidents to happen. Therefore, abusing Ad-Dahr was prohibited due to this consideration, for it was Allah Whom they meant by abusing Ad-Dahr, which — as we said– they accused of causing (distressful) incidents.” 
The explanation provided and cited by Imam Ibn Kathir is not far-fetched can be obtained by pondering over the wordings of the Hadith. The Hadith uses the words I am Dahr since in My hand are the day and the night which clearly mean that the One who causes the alteration of the day and night is none other than Almighty Allah which the pagan Arabs clearly denied when they said there is not but our worldly life; we die and live, and nothing destroys us except time. By time, they meant chance and something with no control; they did not attribute this to Allah which is an atheistic standpoint.
The following statement of Ibn Qutayba also makes the matter very clear:
سمع زياد رجلا يسبّ الزمان فقال: «لو كان يدري ما الزمان لعاقبته إنما الزمان هو السلطان
Ziyad heard a man blame time, whereupon he said: “If he knew what time is, I should have him punished, time is nothing else but the government itself.”
In short, we can conclude that there is no contradiction between the Qur’an and the Hadith and accepting the Hadith does not change the meaning of the verse, neither does the understanding of the Qur’an conflict with the Hadith. The Hadith simply means that abusing Dahr is in actual abusing Allah who controls the time, era etc.
Indeed, Allah knows best.