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:97:5

Peace it is until the emergence of dawn.  

It is peaceful (salāmun hiya: a predicate preceding the subject) until the rising of the dawn (read matla‘ or matli‘), until the time it rises: it is peaceful because of the numerous salutations ˹of peace˺ (salām) spoken in it by the angels, who, every time they come across a believing man or believing woman, bid him peace. Meccan or Medinese, consisting of 8 verses.
القرآن:٩٧:٥

سَلَامٌ هِيَ حَتَّىٰ مَطْلَعِ الْفَجْرِ  

{سلام هي} خبر مقدم ومبتدأ {حتى مطلع الفجر} بفتح اللام وكسرها إلى وقت طلوعه، جُعلت سلاما لكثرة السلام فيها من الملائكة لا تمر بمؤمن ولا مؤمنة إلا سلمت عليه.