The Current Time is Incorrect on My LabVIEW Real-Time Controller

Updated Sep 23, 2020

Reported In

Software

  • LabVIEW Real-Time Module

Driver

  • NI-Sync

Operating System

  • NI Linux Real-Time
  • PharLap
  • VxWorks

Issue Details

  • Why are the time and date incorrect on my Real-Time Controller and how can I fix this?
  • My Real-Time Target's time is offset from the correct time. How can I change this?

Solution

Your Real-Time Controller's time and date could be incorrect if:
1. You have not yet set the correct time zone for your controller.
2. Your host computer is set to a different time zone.

You can change the time zone that your controller is set to by following the instructions in How to Set the Time Zone of a Real-Time Controller.

If you have configured the correct time zone but are still observing an offset, check the functions that are being used to display the current time.

If you are using Get Date/Time in Seconds from the Timing Palette, you are likely using a Time Stamp indicator to display the time on the front panel.
 
This can cause the time of the Real-Time controller to be displayed in the time zone of your host computer rather than its own time zone.
The front panels of all real-time applications reside on the host computer, so a Time Stamp indicator will reference the time zone of the computer LabVIEW is running on, rather than the one of the Real-Time Target. The Time Stamp indicator will then automatically convert the date and time to display it in the computer's own timezone.

One way to avoid an unintentional time zone conversion is by using Get Date/Time String, instead of Get Date/Time in Seconds, to obtain the current time on the controller. 

 
You could also convert the timestamp data type by using the Seconds to Date/Time VI.

All of these functions can be found by navigating to Functions Palette » Programming » Timing.

If after following the instructions above you still see an incorrect time in your controller, try to update to the latest software and driver version.

Additional Information

LabVIEW determines the host computer's time zone configuration at launch. You will need to restart LabVIEW for any change to the host computer's time zone to take effect.