#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtSetSystemTime routine sets the current system time and date. The system time is expressed in Coordinated Universal Time (UTC).
*
* @param SystemTime A pointer to a LARGE_INTEGER structure that that contains the new system date and time.
* @param PreviousTime A pointer to a LARGE_INTEGER structure that that contains the previous system time.
* @return NTSTATUS Successful or errant status.
* @remarks The calling process must have the SE_SYSTEMTIME_NAME privilege.
* @see https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-setsystemtime
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetSystemTime(
_In_opt_ PLARGE_INTEGER SystemTime,
_Out_opt_ PLARGE_INTEGER PreviousTime
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetSystemTime(
_In_opt_ PLARGE_INTEGER SystemTime,
_Out_opt_ PLARGE_INTEGER PreviousTime
);
View code on GitHub
Function NtSetSystemTime
sets system time. See NtQuerySystemTime
for detailed information.
Pointer to LARGE_INTEGER
contains UTC time to set.
Optionally receives time before change.
Privilege: SE_SYSTEMTIME_PRIVILEGE