Skip to content

Latest commit

 

History

History
106 lines (76 loc) · 3.01 KB

nf-sysinfoapi-setsystemtime.md

File metadata and controls

106 lines (76 loc) · 3.01 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:sysinfoapi.SetSystemTime
SetSystemTime function (sysinfoapi.h)
Sets the current system time and date. The system time is expressed in Coordinated Universal Time (UTC).
SetSystemTime
SetSystemTime function
_win32_setsystemtime
base.setsystemtime
sysinfoapi/SetSystemTime
base\setsystemtime.htm
winprog
0768794d-de61-4d5c-96ad-4c4711c72584
12/05/2018
SetSystemTime, SetSystemTime function, _win32_setsystemtime, base.setsystemtime, sysinfoapi/SetSystemTime
sysinfoapi.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
SetSystemTime
sysinfoapi/SetSystemTime
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-SysInfo-l1-2-0.dll
KernelBase.dll
API-MS-Win-Core-SysInfo-l1-2-1.dll
API-MS-Win-Core-SysInfo-l1-2-2.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
API-MS-Win-Core-SysInfo-l1-2-3.dll
SetSystemTime

SetSystemTime function

-description

Sets the current system time and date. The system time is expressed in Coordinated Universal Time (UTC).

-parameters

-param lpSystemTime [in]

A pointer to a SYSTEMTIME structure that contains the new system date and time.

The wDayOfWeek member of the SYSTEMTIME structure is ignored.

-returns

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

-remarks

The calling process must have the SE_SYSTEMTIME_NAME privilege. This privilege is disabled by default. The SetSystemTime function enables the SE_SYSTEMTIME_NAME privilege before changing the system time and disables the privilege before returning. For more information, see Running with Special Privileges.

-see-also

GetSystemTime

SYSTEMTIME

SetSystemTimeAdjustment

System Time

Time Functions