It is narrated from Hazrat Ata that the Holy Prophet (peace and blessings be upon him) permitted the shepherds to perform the stoning at night.