JD Time Synchronization Interface Address:The hyperlink login is visible.
The software calculates the HTTP send request to the end request, resulting in the network latency consumed
Set the system time, call the function in the window API
SetLocalTime is used to set the current local time and date. SetLocalTime(); Function: Set the current local time and date. Syntax: BOOL WINAPI SetLocalTime( _In_ constSYSTEMTIME *lpSystemTime); Parameter: lpSystemTime A pointer to the SYSTEMTIME structure that contains the new local date and time. The SYSTEMTIME structure wDayOfWeek member is ignored. Return value: If the function call is successful, the return value is a non-zero value. If the function fails, the return value is zero. To get the extended error message, call the GetLastError function. Remarks: The calling process must have a privileged SE_SYSTEMTIME_NAME. This permission is disabled by default. The SetLocalTime feature enables SE_SYSTEMTIME_NAME permissions before changing the local time return and disabled permissions. For more information, see Run privileges. The system uses internal UTC. Therefore, when you call SetLocalTime, the system takes the current time zone information for conversion, including daylight saving time settings. Note that the system uses daylight saving time to set the current time, not a new time. So, to ensure the correct result, the first call to SetLocalTime is called the second time, and the daylight saving time setting has now been updated.
The code is as follows:
The http request code is as follows:
Software Download:
Tourists, if you want to see the hidden content of this post, please Reply
|