REL 1.0
Page 60 of 69
iWave Systems Technologies Pvt. Ltd.
iW-RainboW-G15D Linux User Manual
5.6
RTC Test
The given BSP supports the built-in RTC. This section explains how to test RTC in the iW-RainboW-G15M platform.
To list out the date options, execute the below command.
root@iWave-G15/$date --help
BusyBox v1.20.2 () multi-call binary.
Usage: date [OPTIONS] [+FMT] [TIME]
Display time (using +FMT), or set time
[-s,--set] TIME Set time to TIME
-u,--utc Work in UTC (don't convert to local time)
-R,--rfc-2822 Output RFC-2822 compliant date string
-I[SPEC] Output ISO-8601 compliant date string
SPEC='date' (default) for date only,
'hours', 'minutes', or 'seconds' for date and
time to the indicated precision
-r,--reference FILE Display last modification time of FILE
-d,--date TIME Display TIME, not 'now'
-D FMT Use FMT for -d TIME conversion
Recognized TIME formats:
hh:mm[:ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead
To view the date, execute the below command.
root@iWave-G15/$date -R
Tue, 27 Nov 2012 02:30:58 +0000
To set the date and time, execute the below command.
root@iWave-G15/$date -s
Example
root@iWave-G15/$date -s ‘2016-02-27 02:30:45’
To update the set date and time into hardware clock, execute the below command.
root@iWave-G15/$hwclock –w