Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

SetSystemTime

LabWindows/CVI 8.5 Help
November 2007

NI Part Number:
370051K-01

»View Product Info

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.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit