The summer solstice that falls this year on June 21 marks the longest day of the year in the Northern Hemisphere, sunlight-wise. Almost imperceptibly, however, Earth's day–night cycle—one rotation on its axis—is growing longer year by year, and has been for most of the planet's history.

Forces from afar conspire to put the brakes on our spinning world—ocean tides generated by both the moon and sun's gravity add 1.7 milliseconds to the length of a day each century, although that figure changes on geologic timescales. The moon is slowly spiraling away from Earth as it drives day-stretching tides, a phenomenon recorded in rocks and fossils that provides clues to the satellite's origin and ultimate fate. "You're putting energy into the moon's orbit and taking it out of the Earth's spin," says James Williams, a senior research scientist at NASA's Jet Propulsion Laboratory in Pasadena, Calif.

The moon's gravity generates tides by pulling hardest on the side of Earth facing it. This attraction causes the planet to bulge, especially in its malleable oceans. (The sun affects tides in the same way, although in comparison due to its great distance they amount to only about a fifth of the lunar influence on our planetary pirouette.) Earth rotates faster than the moon orbits it, so the watery tidal bulge travels ahead of the moon's relative position. This displaced mass gravitationally tugs the moon forward, imparting energy and giving the satellite an orbital boost, whereas friction along the seafloor curbs Earth's rotation.

Williams has studied how fast the moon is corkscrewing away by shining lasers from Earth at prism-shaped reflectors placed on the lunar surface in the late 1960s and early 1970s by U.S. astronauts and unmanned Russian probes. Changes in the beam's round-trip time reveal the moon's recession rate—3.8 centimeters per year—which, largely due to the orientation of Earth's landmasses and its effect on oceanic sloshing, is faster now than in previous epochs, Williams says.

Hints of inconsistent Earthly timekeeping come through natural calendars preserved in fossils. Corals, for example, go through daily and seasonal growing cycles that form bands akin to growth rings in trees; counting them shows how many days passed in a year. In the early Carboniferous period some 350 million years ago an Earth year was around 385 days, ancient corals indicate, meaning not that it took longer for the planet to revolve around the sun, but that a day–night cycle was less than 23 hours long.

Sedimentary rocks such as sandstone also testify to the quicker days of yore. As moon-spawned tides wash over rocks they deposit mineral specks, layer upon layer. In southern Australia, for example, these vertically accumulating tidal "rhythmites" have pegged an Earth day at 21.9 hours some 620 million years ago. This equates to a 400-day year, although other estimates suggest even brisker daily rotations then.

"As you start going further back in time, the records get difficult to interpret," says Kurt Lambeck, a geophysicist at the Australian National University in Canberra. Lambeck, who serves as president of the Australian Academy of Science, wrote a book on the subject, The Earth's Variable Rotation: Geophysical Causes and Consequences, in 1980. "But the records have tended to support a general pattern going back that the number of days in the year increases," Lambeck says.

These data demonstrate that today's regular ocean tides also happened deep in the past, says Lambeck, lending support to the prevailing moon formation theory of a collision between a primordial Earth and a Mars-size body 4.5 billion years ago. If the moon were instead formed elsewhere and later captured by Earth's gravity, the tides would not have held so steady throughout history, Lambeck says.

Most computer simulations of this explosive lunar genesis suggest that Earth whirled afterward on its axis every six hours, says Jay Melosh, an Earth and atmospheric scientist at Purdue University. As the moon has migrated out from an initial tighter orbit of perhaps 25,000 kilometersto the modern average distance of 384,000 kilometers, it has teamed up with the sun to protract Earthly days fourfold.

Early human record-keeping of solar eclipses has also bolstered the case for lengthening the planet's rotation time. Researchers have extrapolated orbital paths back 32 centuries, demonstrating that if Earth's rotation rate had not changed, eclipse shadows would have appeared thousands of kilometers from Chinese scribes who etched astronomical observations into animal bones. The math indicates that days now are 0.047 second longer than they were in 1200 B.C.

Arriving at this comparatively recent value required factoring in the changing shape of Earth itself due to the thawing of the last ice age, NASA's Williams says. As ice in northern latitudes began melting about 13,000 years ago, the ground rose underneath, making Earth rotate faster, rather like a spinning figure skater who pulls her arms above her head. This continuing post-glacial rebound shaves about 0.6 second off a day per century—not enough to trump tidal braking caused by the moon and sun.

Accordingly, over the eons separating ice ages, the length of Earth's day can waver. Even on a daily basis, as it were, day length is tweaked millionths of a second by shifting mass in the oceans due to windy weather and geologic shifts, such as the magnitude 8.8 Chilean earthquake that struck in February. And global warming is expected to shorten the day by 0.12 millisecond over the next two centuries by heating the oceans and changing the distribution of its mass.

As days dilate overall, "leap seconds" have to be added to official Universal Time, which is based an Earth's rotation, to keep it in sync with ultraprecise atomic clocks that are far more stable. Twenty-four leap seconds have accrued since 1972; the most recent was tacked on in December 2008.

Those leap seconds will not cease. "The moon will continue to go farther away and Earth will continue to slow down," Lambeck says, until Earth becomes tidally locked, meaning only one hemisphere of our planet will see the moon in the sky. (The moon is already tidally locked in its revolution around Earth, so we see the same lunar hemisphere at all times.) A single day on Earth could eventually exceed 1,000 hours, but a back-of-the-envelope reckoning has this happening in 50 billion years. By then, the oceans—the main source of tidal friction—will have long since evaporated, and Earth and the moon might be toast, gobbled up tens of billions of years earlier by the ballooning red giant sun.

Should the Earth–moon system survive this cataclysm, upon mutual tidal locking the moon would actually begin spiraling back in toward Earth, and the day-lengthening process would reverse itself. Eventually, Lambeck says, the moon would be gravitationally shattered or might even smash into Earth, which would make for a long day, figuratively speaking, for anyone still around.