Windows XP time changer/setter.

Posts 1–3 of 3 · Page 1 of 1
Windows XP time changer/setter.
Okay so i didnt really know where to post this, but i am looking for a program/script compatible with winXP that will continiously change/set my time to the one i set so for example my time will always be 12:00. Any ideas?
Here you go... should be compatible with XP if compiled correctly and resets the time every 60 seconds... you might need to adjust this because it's currencly UTC.

Code:
#include <Windows.h>
#include <sysinfoapi.h>

int main()
{
    SYSTEMTIME sys_time;
    GetSystemTime(&sys_time);

    sys_time.wHour = 12;
    sys_time.wMinute = 0;
    sys_time.wSecond = 0;
    sys_time.wMilliseconds = 0;

    while (TRUE)
    {
        BOOL result = SetSystemTime(&sys_time);
        if (!result)
        {
             return result;
        }

        Sleep(60000);
    }
}
Thanls for sharing
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us