Solution
Note: This issue was fixed in NI Linux Real-Time 2020. The steps below are a workaround for earlier versions of NI Linux Real-Time.
This article explains the steps to modify a NI Linux Real-Time device timezone. The instructions included in this article are intended strictly for NI Linux RT based devices. To change the timezone using VxWorks or Phar Lab based devices, please refer to
this article.
After following these steps you should be able to define your current timezone.
In order to change a NI Linux Real-Time controller timezone you have to access to the device shell.
In order to do this, access the shell of your device following the steps given in the article "
Accessing the Shell on NI Linux Real-Time Devices" and then follow these instructions afterwards:
- cd /etc/natinst/share to move to the "/etc/natinst/share" folder
- Optional: ls -l to display the link to the current timezone used.
- rm localtime to delete the current link to timezone information.
- ln -s /usr/share/zoneinfo/Europe/Berlin localtime to set the desired timezone (in this example Berlin/Europe timezone is used). The new setting is immediately active, no restart needed.
- Optional: ls -l to verify the new timezone link was successfully created.
- Optional: date to show the current system's time.
The list of the possible timezones is contained in the path
/usr/share/zoneinfo/Use
ls /usr/share/zoneinfo to explore the highest level, and e.g.
ls /usr/share/zoneinfo/Europe to explore a subfolder, accordingly.
You may need to press the
Refresh button on NI Measurement & Automation Explorer (MAX) to display the new timezone
You can verify that the timezone shown in NI MAX is aligned with that set on the device by using the
date command in the shell.