rtc
QNX Board Support Packages8.0BSP User's GuideAMD Versal AI Edge VE2302AMDAMDARM
Set or get date from real-time clock (QNX OS)
Note:
You must be root or have the correct abilities to run this utility.
Syntax:
Update the current time based on the time from the specified clock:
rtc [options] clock_type
Runs on:
QNX OS
Options:
- -l
- Set hardware time to local time, not Coordinated Universal Time (UTC).
- -s
- Set hardware clock to current date and time.
- clock_type
- Use hw for hardware clock (automatically selects one based on information provided by the startup).
Description:
The rtc command gets or sets the date and time from a battery backed-up hardware clock.
If your machine has a built-in clock/calendar, you should include the following command in your startup script so QNX OS automatically reads the time when the system starts:
rtc hw
Examples:
Update the current date and time from the hardware clock:
rtc hw
Set hardware clock with current date and time:
rtc -s hw
Exit status:
- 0
- Successful.
- >0
- An error occurred.
Page updated:
