I think Japanese Specialist-san's answer is correct, If you indicated "12:00 a.m." as midnight.
Midnight = 12:00 a.m., according to the following web-site = 午後12時 or 午前零時 in Japanese
'12-hour clock' :
https://en.wikipedia.org/wiki/12-hour_clock#Typography ;
"The 12-hour clock is a time convention in which the 24 hours of the day are divided into two periods:[1] a.m. (from the Latin ante meridiem, meaning "before midday") and p.m. (post meridiem, "after midday").[2] Each period consists of 12 hours numbered: 12 (acting as zero),[3] 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11. The 24 hour/day cycle starts at 12 midnight (often indicated as 12 a.m.), runs through 12 noon (often indicated as 12 p.m.), and continues to the midnight at the end of the day."
If you meant "12:00 a.m." as noon;
Noon = 12:00 p.m., according to the web-site above = 午前12時, 午後零時, or 正午<しょうご> in Japanese
And, as for me, I usually say "(just) at noon" "正午(に)" and "(just) at midnight" "午前零時(に)".