The birth of Jesus probably didn't happen in the year 0AD but slightly earlier, in about 5, 6 or 7BC. The dates that we use now were set by Monks and religious leaders in the Middle Ages and before. It's also quite likely that Jesus was actually born in the autumn (during Tabernacles), not in the winter! It can get very cold in the winter in Israel and it is thought that the census would have most likely taken place during the spring or autumn, at a when many pilgrims, from all over the country, came to visit Jerusalem (which is about six miles from Bethlehem). Also during the winter, it's less likely that the shepherds would have been keeping sheep out on the hills (as those hills can get quite a lot of snow during winter sometimes!).