If one believes that our world is billions of years old, i.e. accepting the idea of each day in Sheshis Imei Berieshit (the Six Days of Creation) as eras and not literal days, then how does one understand keeping Shabbat as the seventh day, thus taking that 'day' literally?
Also, one can consider that "time started" in the way we know it only at the end of creation with the creation of Shabbat. Thus, only Shabbat has to be considered a 24 hour day. For example the sun moon and stars were created on the fourth "day" so that "before" then could not have been days as we know them. Before Yom HaShishi, each day was turned on and off explicitly. It is only at the very end (Vayechulu) do we have the actual time being significant.
Also consider that only man has an appreciation of time. This could imply that "time started" only with the creation of Adam. This could lead to a hashkafa article, but that is too long and philosophical to go into now.
Rabbi Dovid Gottlieb suggests that in the original six days of creation time moved faster than today. just like in the embryonic stage one does not need to breathe through his nostrils or eat through his mouth, etc.
so you can have a 24 hour day spanning billions of years the rules were different in those embryonic days
(we also find for example Kain and Abel born and grown up in the sixth day according to the midrash)
ויאמר משה אכלוהו היום, כי-שבת היום ליהוה: היום, לא תמצאוהו בשדה. ששת ימים, תלקטוהו; וביום השביעי שבת, לא יהיה-בו
And Moses said "eat [the Manna] today, as today is a Sabbath for G-d. Today, you will not find it in the field. 6 days collect it, and on the seventh rest, for it will not be there.
This verse cannot be interpreted to refer to an era. It is clear from this verse that the Sabbath is one day. So when we are told to rest on the seventh day, it is clear that it is one day.
A clearer verse (which happens to be in Shabbos Day kiddush according to many customs) - Shemos 20:7-9 (the aseres hadibros):
זכור את-יום השבת, לקדשו. ששת ימים תעבוד, ועשית כל-מלאכתך. ויום, השביעי--שבת, ליהוה אלוהיך:
Remember the Sabbath to sanctify it. 6 days work, and do all your activities, and on the seventh day, rest for Hashem your G-d.
Again, here clearly this is not referring to eras, and this is the injunction to keep the Sabbath. It also refers to the Sabbath as the seventh day.
Many people think that the Torah tells us in Genesis 1:1-1:3 about the creation of the world. Obviously, the Torah story certainly contradicts what science teaches. It is strange because the story seems to say that G-d created the world in six days. Is an all-powerful G-d incapable of creating the world instantaneously? It also implies that G-d rested on the seventh day. Does an all-powerful G-d tire? Perhaps the Torah is not telling us about G-d at all, but about humanity. In fact, an argument could be made that there weren't "days" at all but eons. The universe was formed over the course of billions of years.
Some insist that G-d rested on the seventh day, Shabbat. But this is not so. We should ask ourselves, does G-d need a rest? Actually, "rest" means "did not continue to create." Some scholars feel that Maimonides' view is that G-d formed the world out of pre-existing matter, there can be no “first day” per se if we understand Scripture in this fashion, further demonstrating that there were no concept of “days” in the Genesis account. In any event, the Shabbat is to recall that there is a G-d and that G-d created the world. Thus, it seems that the Bible isn't saying that G-d took a rest at all, nor does it imply that G-d created the world in six literal days. This is a parable to teach us about humanity.
Since Shabbat is people-oriented, Exodus 20:10, states that Shabbat was instituted to recall that there is a G-d, that G-d created the world, and that G-d gave the laws of the Torah. Leviticus 25:1 explains that keeping Shabbat is not optional. People need a rest. People also should stop working and think about G-d, understand what G-d wants from them, and enjoy the day with good clothes and food. This is not optional; it is "G-d's day" and this is what G-d wants.