EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.

SetSystemTime function

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

Syntax


BOOL WINAPI SetSystemTime(
  _In_  const SYSTEMTIME *lpSystemTime
);

Parameters

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.

Return value

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

GetSystemTime
SetSystemTimeAdjustment
System Time
SYSTEMTIME
Time Functions

 

 

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft