Go into the Book of John chapter 19 verse 31 and you will see that Jesus was removed from the cross before sun down.
Let's back up in Galatians chapter 3 to verses 10 and watch how we have a different law in the second half of the verse.
For as many as are of the works of the law are under the curse: for it is written,
Cursed is every one that continueth not in all things which are written in the book of the law to do them. (Galatians 3:10)
This law is part of the commandments.
Once again Paul, is quoting Moses, let's take a look.
Cursed be he that confirmeth not all the words of this law to do them. And all the people shall say, Amen. (Deuteronomy 27:26)