I'm doing tests for a system on which the output depends on the current date, the system compares the output with an expected output I prepared previously. For the test to pass, I shall invoke the system with the same date so I can obtain the same results and the test can succeed. otherwise, the test will fail.
I want to set the current date within the cmd scope ONLY without affecting the current date of the system.
This date is accessed either using the latex (\the\year)
variable and from python using the datetime library (datetime.now())
.
I tried using the date
command but this changes the date in the system which triggers many operations and errors (Antivirus updates, etc ...) because its a corporate server so I should not change the date of the server while running the tests.
I can write code to neglect the comparison of the dates, but this operation is too complicated as the date is written in generated PDFs and many other files are in different formats.
So, is it possible to change the current date within the windows 10 command line ONLY (Not system scope)?