Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:30:18

And to Him is ˹due all˺ praise throughout the heavens and the earth. And ˹exalted is He˺ at night and when you are at noon.  

And to Him belongs ˹all˺ praise in the heavens and the earth — a parenthetical statement, in other words, the inhabitants in both of these ˹realms˺ praise Him — and as the sun declines (wa-‘ashiyyan is a supplement to hīna, ‘when’ ˹of the previous verse˺), in which comes the afternoon prayer (‘asr), and when you enter noontime, in which comes the midday prayer (zuhr).
القرآن:٣٠:١٨

وَلَهُ الْحَمْدُ فِي السَّمَاوَاتِ وَالْأَرْضِ وَعَشِيًّا وَحِينَ تُظْهِرُونَ  

{وله الحمد في السموات والأرض} اعتراض ومعناه يحمده أهلهما {وعشيا} عطف على حين وفيه صلاة العصر {وحين تظهرون} تدخلون في الظهيرة وفيه صلاة الظهر.