Midnight is the transition time from one day to the next – the moment when the date changes. In ancient Roman timekeeping, midnight was halfway between sunset and sunrise (i.e., solar midnight), varying according to the seasons. By clock time, midnight is the opposite of noon, differing from it by 12 hours.
Solar midnight is the time opposite to solar noon, when the Sun is closest to the nadir, and the night is equidistant from dusk and dawn. Due to the advent of time zones, which regularize time across a range of meridians, and daylight saving time, it rarely coincides with 12 midnight on the clock. Solar midnight depends on longitude and time of the year rather than on time zone.
In the Northern Hemisphere, "midnight" had an ancient geographic association with "north" (as did "noon" with "south" – see noon). Modern Polish, Belarusian, Ukrainian and Serbian preserve this association with its word for "midnight" (północ, поўнач, північ, пoнoħ – literally "half-night"), which also means "north".
Midnight marks the beginning and ending of each day in civil time throughout the world. As the dividing point between one day and another, midnight defies easy classification as either part of the preceding day or of the following day. Though there is no global unanimity on the issue, most often midnight is considered the start of a new day and is associated with the hour 00:00. Even in locales with this technical resolution, however, vernacular references to midnight as the end of any given day may be common.
Strictly speaking, it is incorrect to use "a.m." and "p.m." when referring to noon or midnight. The abbreviation a.m. stands for ante meridiem or before noon, and p.m. stands for post meridiem or after noon. Since noon is neither before nor after noon, and midnight is exactly twelve hours before and after noon, neither abbreviation is correct. However, many digital representations of time are configured to require an "a.m." or "p.m." designation, preventing the correct absence of such designators at midnight. In such cases, there is no international standard defining which arbitrary selection is best.
In the United States and Canada, digital clocks and computers commonly display 12 a.m at midnight. The thirtieth edition of the U.S. Government Style Manual (2008), in sections 9.54 and 12.9b, recommended the use of "12 a.m." for midnight and "12 p.m." for noon. However, the previous 29th edition of the U.S. Government Printing Office Style Manual (2000), in section 12.9, recommended the opposite. There is no further record documenting this change. The US National Institute of Standards and Technology (NIST) recommends avoiding confusion altogether by using "00.01 am" and the date instead of "midnight."
There are several common approaches to identifying and distinguishing the precise start and end of any given day.