In school we learn early that February occasionally has 29 days, rather than 28. Leap years are necessary because the Earth hasn't spun an integral number of times in one year. If we ignore leap years, the calendar starts to diverge from the seasons.
In 325 A.D. The Council of Nicaea decreed that Easter should fall on the first Sunday after the first full moon after the vernal equinox. The problem lay in trying to predict what calendar date this would actually fall on, so that the Church could prepare a universal set of timetables for celebrating the correct mass. Very quickly the Church ran into problems when the accumulated errors from non-integral days in a lunar month, non-integral lunar months in a year, and non-integral days in a year all piled up on each other.
The last time we sorted out this problem (because the calendar was different from the seasons by ten days by the 12th century), some very interesting people were involved in the mathematics and structures developed to deal with this dilemma. A good technical read is John Heilbron's The Sun in the Church: Cathedrals as Solar Observatories. (1999, Harvard Univ. Press, 392 pp.)
Well, as you know, the solution was the leap-year. And the non-leap-year leap-years (remember 2000?). And the leap-year non-leap-year leap-years... etc. etc. You get the picture. Successive approximations. A complex problem, with a complex solution.
Well of course the more closely you look at it, the more complicated the whole thing is. The problem is that the Earth's day isn't always constant, either. I talked about Earth's wobbles in a previous post, but the issue here is the length of day, or LOD.
It turns out that there are actually leap-seconds, too. Every couple of years, an extra second is snuck in to your day. Now, it's not as noticeable as that wonderful extra hour of sleep we just got, but it is just as important. The reason is that the Earth's rotation is actually slowing down due to tidal friction (which also means that the Moon is slowly getting farther away, and will eventually be lost). A constant clock would slowly gain on the actual rotation of the Earth at a rate of about 2 minutes every hundred years.
"That's no big deal," you say. And I agree, where personal time is concerned. Humans can't notice changes like that. But computers can. For example, the computers that transfer your mortgage and escrow payments at the very last possible moment, in order to earn all possible interest. "Sorry, your payment was late by 1 second" is not something any bank wants to try and tell you. They know they will get an earful, so a completely standardized time is important. Especially if we want to make e-commerce work.
The surprising thing is that no one has really agreed on how to consistently do the leap-second shimmy thing. There are many brands of time out there -- by which I mean: solar, sidereal, Standard, Greenwich Mean, international atomic, GPS, Universal, and Coordinated Universal. And they all differ. Some by as much as 32 seconds. And not all of them leap at the same time. Not surprisingly, with so many to choose from, there are all kinds of problems built in to many computers because of the initial design choices.
You're damned if you do leap: the UTC leap seconds of 1994 and 1997 crashed the Soviet GLONASS navigation system. ...and you're damned if you don't: at midnight on November 27 2003, Motorola Oncore GPS receivers will skip a day, and then correct themselves within the next second, all because the best guess at the time they were designed was that we would have had another UTC leap second by now.
How to resolve this? By committee, of course! The International Telecommunications Union is studying the problem, and they might decide to throw out the leap second entirely. Just not right now, this second. They want to wait until 2022.