# SetSystemTime

SetSystemTime (int hours, int minutes, int seconds);

## Purpose

Sets the system time.

Linux This function is not supported.

| Note You must have system administrator status to use this function.

| Note Windows SDK also contains a SetSystemTime function. If you include windows.h and do not include utility.h, you will receive compile errors if you call the SetSystemTime function.

## Parameters

Input
Name | Type | Description
hours | integer | The hours component of the time. Values: 0 to 23
minutes | integer | The minutes component of the time. Values: 0 to 59
seconds | integer | The seconds component of the time. You can specify only even numbers. If you specify an odd number of seconds, the number is rounded down. Values: 0 to 58

## Return Value

Name | Type | Description
result | integer | The result of the call.
Code | Description
0 | Success.
-1 | Operating system reported failure, probably because of an invalid parameter.