A.M. and P.M. start immediately after Midnight and Noon respectively.
This means that 00:00 A.M. or 00:00 P.M. (or 12:00 A.M. and 12:00 P.M.) have no meaning.
Every day starts precisely at midnight and A.M. starts immediately after that point in time e.g. 00:00:01 A.M. (see also leap seconds )
When scheduling around midnight, prefer to use either 23:59 or 00:01 to avoid confusion as to which day is being referred to.
It is after Noon that P.M. starts e.g. 00:00:01 PM (12:00:01)