20.2.4 System Times

The internal system time is set automatically from the hardware clock when Win32 starts running. The GetSystemTime function can be used to retrieve the system time, as shown in the example above. The SetSystemTime function sets the internal system clock.

To set the system time, a process must have SeSystemTimePrivilege. For information about acquiring this privilege, see Chapter 9, “Security.”