Times of day
This is a tricky question because 12 a.m. and 12 p.m. are ambiguous and should not be used.
To illustrate this, consider that "a.m." and "p.m." are abbreviations for "ante meridiem" and "post meridiem," which mean "before noon" and "after noon," respectively. Since noon is neither before noon nor after noon, a designation of either a.m. or p.m. is incorrect. Also, midnight is both twelve hours before noon and twelve hours after noon.
It is fair to say, however, that the shortest measurable duration after noon should be designated as p.m. For example, it would be applicable for a digital clock changing from 11:59:59 a.m. to 12:00:00 to indicate p.m. as soon as it the 12:00 appears, and not delay the display of the p.m. by a minute, or even a second. The same is true for midnight, but there is an added issue of which day midnight refers to (see below).
Hours of operation for a business or other references to a block of time should also follow this designation rule.
For example, a business might be open on Saturdays from 8 a.m. to noon or weekends from 3:30 p.m. until midnight.
When someone refers to "midnight tonight" or "midnight last night" the reference of time is obvious. However, if a date/time is referred to as "at midnight on Friday, October 20th" the intention could be either midnight the beginning of the day or midnight at the end of the day.
To avoid ambiguity, specification of an event as occurring on a particular day at 11:59 p.m. or 12:01 a.m. is a good idea, especially legal documents such as contracts and insurance policies. Another option would be to use 24-hour clock, using the designation of 0000 to refer to midnight at the beginning of a given day (or date) and 2400 to designate the end of a given day (or date).
Dawn occurs at the time that the geometric center of the Sun is 18° below the horizon in the morning. Respectively, dusk occurs when the geometric center of the Sun is 18° below the horizon in the evening. Twilight refers to the periods between the dawn and sunrise and sunset and dusk, where sunrise and sunset are defined as the exact times when the upper edge of the disc of the Sun is at the horizon. The hazy light during this period is an effect caused by the scattering of the sunlight in the upper atmosphere and reflecting towards Earth. It is very subjective as far as the time of day that twilight occurs, because it depends on the location and elevation of the observer, the time of year and local weather conditions.
In addition, twilight is divided into three durations based on the angle of the Sun below the horizon. Astronomical twilight is the period when the Sun is between 18° and 12° below the horizon. Nautical twilight is the period when the Sun is between 12° and 6° below the horizon, and civil twilight is the period when the Sun is between 6° below the horizon until sunrise. The same designations are used for periods of evening twilight.