Correct use of AM and PM
A.M. and P.M. start immediately upon Midnight and Noon respectively.
The universal convention is that 12:00 AM signifies midnight, and every moment afterward is also AM until the moment of 12:00 PM which signifies midday.
Therefore every day starts precisely at midnight, and A.M. starts immediately so that 00:00:00 (24 hour format) is the first moment of A.M. (see also leap seconds )
When scheduling around midnight, some use 23:59 to mean "same-day" and 00:01 to mean "next day." But it is best to use the correct date, since 00:00 is always same-day, there is no option within the 24 hour notation of specifying tomorrow.
P.M. starts at 12 PM (12:00 hrs)
Further notes on time measurement
Under consideration for measuring time is a notional Prime Meridian (or meridien for more archaic Anglo-French spelling) this is a line of longitude that is measured rotating in view of the sun and makes the common measurement of practical world time possible. At midday, 12:00 PM GMT the sun is directly above this notional line and at midnight the sun is directly opposed on the other side of the earth. The interchange of the terms, Meridiem and Meridien is interesting, since the former refers to time and the latter to space. As we know from Einstein's discovery of relativity the scientific reality is a dimension that had not been previously intuited, which he called space-time. You cannot measure time without a spatial marker and a fixed velocity and you cannot measure a velocity without assessing both space and time. Time is a metaphysical quantity we can only approach indirectly through spatial observation and cumulative effect.