Cannot install High Sierra or Sierra, get "installer payload failed signature test" A user came in with their OS all garbaged up. It wouldn't start and when I used Target Mode and copied off documents and scanned the snot out of them I came up with a number of viruses. Afterward I booted into OSX Utilities (CMD + R) and erased the drive.

I then attempted to reinstall the OS but it wouldn't work, I can't remember the error anymore. I tried to install High Sierra but it gave me the message that it couldn't connect to any servers, even though I had internet-recovery booted.

I reformatted the drive to APFS format, no help. I got a USB of HS and same message.

I got a USB of Sierra instead, used it successfully on another machine (2011 MBAir) reformatted this drive to Mac OSX Extended and it began but about 2/3 of the way through stopped and gave me the "installer payload failed signature test" error.
Somewhere along the line it lost its time/date.

If you're still in the OS X Utilities, go to Utilities > Terminal and type

date


to see the current date. Mine was 17 years out of date.
If connected to the internet, update through Apple's server: 

ntpdate -u time.apple.com


if not connected, do it manually

date MMDDHHMMYY


That's month, date, hour, minute, year.
So:

date 1116120717


You can also get to the terminal via CMD+S and Single User Mode, but just do it through the utility.

from these forums I found the incorrect date possibility:
https://forums.developer.apple.com/thread/49094

This site had the steps:
https://www.macworld.com/article/3097533/macs/installing-os-x-what-to-do-when-this-copy-of-the-install-os-x-application-cannot-be-verified.html