A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time (UTC) in order to keep its time of day close to the mean solar time, or UT1. Without such a correction, time reckoned by Earth's rotation drifts away from atomic time because of irregularities in the Earth's rate of rotation. Since this system of correction was implemented in 1972, 27 leap seconds have been inserted, the most recent on December 31, 2016 at 23:59:60 UTC.
The UTC time standard, which is widely used for international timekeeping and as the reference for civil time in most countries, uses the international system (SI) definition of the second, based on atomic clocks. Like most time standards, UTC defines a grouping of seconds into minutes, hours, days, months, and years. However, the duration of one mean solar day is now slightly longer (by roughly 0.001 seconds) than 24 hours (86400 SI seconds) because the rotation of the Earth has slowed down. Therefore, if the UTC day were defined as precisely 86400 SI seconds, the UTC time-of-day would slowly drift apart from that of solar-based standards, such as Greenwich Mean Time (GMT) and its successor UT1. The purpose of a leap second is to compensate for this drift, by occasionally scheduling some UTC days with 86401 or (in principle) 86399 SI seconds.
Specifically, a positive leap second is inserted between second 23:59:59 of a chosen UTC calendar date and second 00:00:00 of the following date. The definition of UTC states that the last day of December and June are preferred, with the last day of March or September as second preference, and the last day of any other month as third preference. All leap seconds (as of 2017) have been scheduled for either June 30 or December 31. The extra second is displayed on UTC clocks as 23:59:60. On clocks that display local time tied to UTC, the leap second may be inserted at the end of some other hour (or half-hour or quarter-hour), depending on the local time zone. A negative leap second would suppress second 23:59:59 of the last day of a chosen month, so that second 23:59:58 of that date would be followed immediately by second 00:00:00 of the following date. Since the introduction of leap seconds, the mean solar day has outpaced UTC only for very brief periods, and has not triggered a negative leap second.