The Shulchan Aruch ruled that a milah not in its time, and a birth at bein hashemashot, do not set Shabbat aside. The Beit Yosef and The Shulchan Aruch required a mohel to inquire whether a Shabbat birth was by surgery. The Ran wrote that since the Rif was in doubt, they circumcise on the eighth day and still do not set Shabbat aside, and so is the view of The Rambam.