Telling boss I am pregnant

I currently started a new job this week. However, when I interviewed with them and got the job, I did not mention my pregnancy because of past stories that I have heard that affect you getting hired (even though legally, it shouldn’t, we all know something always comes up with why they couldn’t hire you) I am really nervous now because a)maybe I should have been up front about it? And b) I am not entirely sure when is a “good” time to tell them that I’ll be having to take maternity leave in March. Any ideas or past experiences with this?