Win32 API
1)
BOOL WINAPI SetLocalTime(
__in const SYSTEMTIME* lpSystemTime
);
The system uses UTC internally. Therefore, when you call SetLocalTime, the system uses the current time zone information to perform the conversion, including the daylight saving time setting. Note that the system uses the daylight saving time setting of the current time, not the new time you are setting. Therefore, to ensure the correct result, call SetLocalTime a second time, now that the first call has updated the daylight saving time setting.
void WINAPI GetLocalTime(
__out LPSYSTEMTIME lpSystemTime
);
2)
void WINAPI GetSystemTime(
__out LPSYSTEMTIME lpSystemTime
);
Retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).
BOOL WINAPI SetSystemTime( __in const SYSTEMTIME* lpSystemTime );