m_essaid
5 years agoValued Contributor
efficient way of changing system date
Hi,
I musn't be the only one who need to change its system datetime while executing tests...
I tried two ways, this one :
net time /set /yes
and this one :
w32tm /resync
with the command line, but both don't work 100% of the time.
Does anyone has any workaround ?
Thank you
We've actually been successful using aqDateTime.SetSystemDateTime.
It requires TestComplete/TestExecute to be run with admin privileges and, as noted above, you might want to stop any network time synchronization to make sure you can preserve your expected time.