Here's somthing for you to play with...
Code:
#include <windows.h>
#include <iostream>
using namespace std;
#include <cstdlib>
void SetTime(LPSYSTEMTIME lpst){
SetSystemTime(lpst);
}
void GetTime(LPSYSTEMTIME lpst){
GetSystemTime(lpst);
cout << "Date " << lpst->wDay << "/" << lpst->wMonth;
cout << "/" << lpst->wYear << endl;
}
int main(int argc,char* argv){
char ch;
SYSTEMTIME stold,stset;
GetTime(&stold);//get time and display
memcpy(&stset,&stold,sizeof(SYSTEMTIME));//copy current time
stset.wDay = 1;//set to 1st day
stset.wMonth = 4;//set to April
SetTime(&stset);//set to new date
cout << "Date changed. Have a look!" << endl;
cout << "Press enter twice to revert to real date" << endl;
cin.ignore();
cin.get(ch);//wait for enter
SetTime(&stold);//set date back
cout << "Date reset.";
return 0;
}
Oh...compile as a c++ console application