Peripherally to my point. Some countries, for example, Panama wil enable a man to stand up in court and make oath that the child is of his loins, or some such. It is a reasonable process as it increases the number of "legitimate" children and "decreases" welfare cases.
However the U..S Department of State is familiar with this process, and if an American tries to use the process, to have a child granted citizenship or access, they will require the man to provide proof that he is in country 8 - 10 months before the child was conceived.
I can imagine, don't know for sure, that now they would demand a paternity test.