In some cases, if the mother is legally married, the husband is assumed to be the child's father, even if he's obviously not. I had a boss years ago who got pregnant by an affair with a man with very dominant features. Her husband forgave her, the biodad wanted nothing to do with the child, so her husband's name is on the birth certificate & they've moved far away.
The fathers name is always allowed on the birth certificate. I have never heard of a time limit on a divorce, before a parents name can appear on a birth certificate. A child deserves to have their parents name acknowledged on the certificate.