The way I see it:
When God began creating the heavens and the earth,
the earth was a shapeless, chaotic mass (or dark gaseous mass), with the Spirit of God brooding over the dark vapors.
Then God said, “Let there be light.” And light appeared.
And God was pleased with it and divided the light from the darkness. He called the light “daytime,” and the darkness “nighttime.” Together they formed the first day (or 'period of time').Genesis 1:1-5 (TLB)
Eternity is an attribute of Jehovah God. When He decided to create the earth, He started with re-ordering the chaos that pre-existed in the universes. At this point, God had not yet ordained and called into being the dimension called time. He did this by selecting the sun as the central point of our universe and moved it into its position and the planets into their orbits. This was when time began. It was not time as we know it today. The first several 'days' mentioned in His Word were not twenty-four hour days but rather 'periods of time'. It was within this 'time', he began to mold the earth into the basic creation we know today. He caused the vapors to move into place as the sky, the oceans, and the land. It was the Mighty Will of God at work.
By William C. Highsmith - July 23, 2018