https://www.law.cornell.edu/supremecourt/text/71/333
... [Pardon] extends to every [Federal] offence known to the law, and may be exercised at any time after its commission, either before legal proceedings are taken or during their pendency or after conviction and judgment.
This power of the President is not subject to legislative control. Congress can neither limit the effect of his pardon nor exclude from its exercise any class of offenders...
That comes from the Garland case mentioned upthread. Garland was granted a pardon for crimes that may have occurred during the Civil War.