To account for these variations, we use leap seconds. A leap second is an extra second that is added to Coordinated Universal Time (UTC) at the end of a month. Leap seconds are added when necessary to keep UTC within 0.9 seconds of Universal Time (UT), which is based on the Earth's rotation. Since 1972, a total of 27 leap seconds have been added to UTC. The most recent leap second was added on December 31, 2016.
The decision to add a leap second is made by the International Earth Rotation and Reference Systems Service (IERS). The IERS monitors the Earth's rotation and orbit and makes recommendations to the International Telecommunication Union (ITU), which is the body that officially adds leap seconds to UTC.
Leap seconds can be a nuisance for some technologies, such as computers and communication systems. However, they are necessary to keep our clocks accurate and synchronized with the Earth's rotation.