The term midnight refers to the point in time when one day ends and the next one begins in civil time, which occurs at 00:00 or 12 AM. Civil time today is based on Coordinated Universal Time (UTC); areas around the world have their own standard time based on time zones that are offset from UTC.
Solar midnight is the definition of midnight based on solar time (rather than civil time), which bases the passage of time on the position of the sun in the sky. Midnight in civil time, which occurs at 00:00 on the 24-hour clock in a given time zone, rarely coincides with solar midnight. This is because solar midnight is dependent on longitude and time of year, rather than on time zones.
Is midnight 12 AM or 12 PM?
It is technically incorrect for midnight to have a designation of either AM or PM. This is because AM and PM stand for ante meridiem and post meridiem respectively, which mean before noon and after noon. Therefore, 12 midnight, which occurs exactly 12 hours before or after noon, could theoretically be designated as AM or PM, so neither is really correct.
However, when using the 12-hour clock, 12 AM is typically used for midnight and 12 PM is used for noon. To avoid the potential confusion of whether "12" refers to midnight or noon, a 24-hour clock can be used.
Because of the ambiguity, it can sometimes be difficult to identify what day a person is referring to when referencing midnight. One way to clarify this is by stating a specific day or date along with midnight. For example, "midnight on Friday night." Perhaps the clearest way is to specify 11:59 PM and 12:01 AM on their respective days/dates rather than using the term midnight.