NI System Configuration API Reference

Set Time (VI)

  • Updated2023-02-21
  • 3 minute(s) read
Installed With: NI System Configuration

Sets the current time and/or time zone on the specified system.

Note  This function is not intended for synchronization of multiple real-time devices. Refer to the Choosing a CompactRIO Synchronization Technology white paper for information on the synchronization of multiple real-time devices.

Set Time

cio.gif

Session in specifies the system receiving changes.

ctimestamp.gif

Time specifies the current time for a remote system or network device. Use the default timestamp to leave the current time unchanged. LabVIEW calculates this timestamp using the number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time.

cstr.gif

Time Zone specifies the time zone for a remote system or network device. Use an empty string to leave the current time zone unchanged.

For a complete list of supported time zone strings by city, refer to the Date and Time Gateway by visiting ni.com/info and entering the Info Code exiyy5 .

The following table includes example cities and their corresponding time zone string:

City Time zone string
Algiers Africa/Algiers
Cairo Africa/Cairo
Chicago America/Chicago
Dubai Asia/Dubai
Dublin Europe/Dublin
Guam Pacific/Guam
Lima America/Lima
Madrid Europe/Madrid
Maldives Indian/Maldives
Perth Australia/Perth
Reykjavik Atlantic/Reykjavik
Note  If your target does not support automatic daylight saving time adjustment, specify the GMT time equivalent for your location instead of the actual time zone. Otherwise, data timestamps may be inaccurate.
cerrcodeclst.gif

error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.

cu32.gif

Remote Timeout specifies the time in milliseconds that this VI waits before it times out. The default amount of time that the VI waits for a response on the network before timing out is 5 minutes. In some cases, the operation may take longer to complete. This timeout is for remote systems only.

iio.gif

Session out returns the refnum for the system.

istr.gif

Detailed Result returns a string containing results of any errors that may have occurred during the VI execution. This parameter also may return additional information about the results of the VI execution.

ibool.gif

Changes Require Restart returns whether the changes require a reboot to take effect. If TRUE, run the Restart VI.

ierrcodeclst.gif

error out returns error information. This output provides standard error out functionality.