Link to home
Start Free TrialLog in
Avatar of Nitro187
Nitro187

asked on

Change system time\date

Could someone provide a code on how to change the systems time, and date?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nitro187
Nitro187

ASKER

I need an example though, I dont know how to use the "SetSystemTime"  function
SYSTEMTIME tm;
tm.wYear = 1999;
tm.wMonth = 7;
tm.wDayOfWeek = 0;  // ignored
tm.wDay = 28;
tm.wHour = 0;
tm.wMinute = 0;
tm.wSecond = 0;
tm.wMilliseconds = 0;

::SetSystemTime(&tm);
thanks man