It was close to the preparation for the Sabbath day after 6 pm. Therefore the Roman guards receive orders to speed up the death of the criminals on the Cross. Jesus also was pierced by them using a spear to ensure He's truly dead. It would have taken them time to bring down the bodies and place them.
Then goes Joseph of Arimathaea a disciple of Jesus, to Pilate to beg for the body of Jesus, also took some time. Then Joseph took His body to a place, since nearing sabbath, probably he couldn't clean the body, but just wrapped Him in a clean linen cloth. Apparently also took time, and next Jesus' body was laid in his new tomb.
By the time He was buried, it was close to the Sabbath day after 6pm. Therefore it couldn't be considered as 'day', but rather 'night' that He was already inside the tomb 'buried'. The prophecy is about Jesus being in the heart of the earth being 'buried' and counting, not His death.
Matthew 12:
40. For as Jonas was three days and three nights in the whale's belly; so shall the Son of man be three days and three nights in the heart of the earth.
Clearly exact counting will be, 12 hours of days and 12 hours of nights, resulting to 24 hours a day. For Jesus' burial count starts out by nights and then days, making it 3 nights and 3 days. Sun rises in Jerusalem just after 6 am, as when the women discovered the tomb was already empty. But according to Jewish calendar, a day of 24 hours, starts from 'sunset' to 'sunset'.
It is written, on the first day of the week and at sunrise, the tomb was already discovered empty. By now on this first day, as 'sunset' to 'sunset', 12 hours of Sunday 'night' have already gone by. Hence, clocking forward at sun rise another 12 hours of Sunday 'day' to go, making it a full day.
In Jerusalem, Jesus was buried at 'sunset', where a new day 'Thursday' starts at 'night' clocking 12 hours, until 'day' another 12 hours, finishing at the next 'sunset'. Therefore, Jesus resurrected after Saturday's 'sunset', marking it 'Sunday' at 'night' in Jerusalem. This is the correct measure fulfilling the prophecy, 3 days and 3 nights, or 3 nights and 3 days in the heart of the earth.
In Jerusalem that day, Thursday night was marking the yearly Sabbath in observation by the Jews, besides the weekly Sabbath.
Shalom in the name of Jesus Christ of Nazareth.