I would like to increment the system clock on a GitHub-hosted runner, as part of our CI suite involves a test that should pass only if the system clock is a certain number of days after the product’s build date. i.e. We build the product, incremement the clock by X number of days, attempt to run the product and then the product should refuse to work and the test will pass.
This is all working except for the actual business of incrementing the system clock. How can I accomplish this? Ideally on Windows but in Linux as well.
I’ve tried setting the system clock by running:
sudo date --set='+20 days', then checking it by running
date however that doesn’t seem to actually increment the date. Does anyone have any suggestions?