When compiling using a Raspberry Pi, and the Raspberry Pi date is out of sync with the client date, why not just automatically sync the Raspberry Pi date with the clients date using ‘sudo date’? Seems like it’d save the user a step if, for example, the Raspberry Pi has been rebooted between compilations.
In our environment, the Raspberry Pi just automatically picked up the date via NTP, so no adjustment was necessary.
If the time sync doesn’t work for you, we would advise investigating and fixing it first. Changing target system time during builds could cause much more problems than it would solve, so we would not advise doing that.