According to some ancient myths, it was the sun that behaved erratically, in association with the mythological catastrophes. The bible has in fact some of the more straightforward myths relating to natural global catastrophes. Ancient observatories, such as Stonehenge, are accurate according to current earth behavior, at about 4000 to 5000 years ago. Stone age rock art is concerned with animal game, fertility and the moon. It is not until this side of the last ice age that an obsession with the sun appears.
Some Eurasian mythology recalls of a very long day, American mythology a very long night.
Egyptian mythology refers to an event that added 5 days to their calendar year. In my opinion, these myths are consistent with the earth being struck by a meteorite that was large enough to cause amazing events in the eyes of humans. The masons spend a lot of time memorizing texts by rote. A useful skill if indeed some catastrophe causes all recorded information to be destroyed, but some humans to survive. I know I'm paranoid, but this is extreme.