When a day is longer or shorter than 24 hours you need to use the equation of time to bring it back into sync.
I know what you’re thinking: when is a day ever longer or shorter than 24 hours? Well, a day is supposed to be one rotation of the planet, but prior to the invention of reliable clocks we measured this by the sun. The time from noon to noon, when the sun is the highest in the sky, is the solar day. You can measure it with a sundial. Here’s the thing, though: a solar day is rarely 24 hours long.
The Earth’s axial tilt (the difference between its axis of rotation and its axis of orbit) and the eccentricity of its orbit around the sun (how far off a perfect circle it is, which affects how fast we’re orbiting) mean that the solar day can be up to 21 seconds shorter or 29 seconds longer. In fact, it’s only ever exactly 24 hours at four points in the year.
Time measured by a clock – “mechanical time” or clock time – is out of sync with solar time. Sometimes by as much as sixteen minutes, because of the accumulation of these short daily differences. Because the solar day gets both shorter and longer at different times, these differences balance out over the course of a year. In fact, the clock day of 24 hours represents the mean of all the solar days in a year. It’s a mathematical average of a more organic and messy reality.
This difference between clock time and solar time is known as the equation of time. The graph above shows how those accumulated differences vary throughout the year. Astronomers have known about it for millennia. Modern sundials may account for the difference by (for example) moving the gnomon according to the month. Some special clocks (called equation clocks) account for the equation of time in their mechanisms. But for the most part the world has moved on from using the sun to keep time.