It is narrated from Sayyiduna Salamah bin Akwa’ (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to perform the Maghrib prayer at the time of sunset, when the upper edge of the sun would set.
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1243