Genesis 2:2-3:
2 And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
3 And God blessed the seventh day, and sanctified it: because that in it he had rested from all his work which God created and made.
He sanctified it then. There was no commandment given over clean/unclean animals yet Noah knew what the deal was:
Genesis 7:2
2 Of every clean beast thou shalt take to thee by sevens, the male and his female: and of beasts that are not clean by two, the male and his female.
Also it says that Abraham followed God's law even though Moses hadn't written it down for the people:
Genesis 26:5
5 Because that Abraham obeyed my voice, and kept my charge, my commandments, my statutes, and my laws.
God hasn't suddenly changed his standard is eternal, it is his very character. God is entirely without sin by definition because sin is the opposite of God's character.
Malachi 3:6
6 For I am the Lord, I change not; therefore ye sons of Jacob are not consumed.
The further we've got from the garden and walking with the creator, a direct personal relationship, the more we've needed things like the law being codified by Moses.