Luke [the gospel writer] screws up his dating by tactlessly mentioning events that historians are capable of independently checking. There was indeed a census under Governor Quirinius - a local census, not one decreed by Caesar Augustus for the Empire as a whole - but it happened too late in 6 AD, long after Herod's death.