DART-SD410 Android Using RTC

From Variscite Wiki

Using RTC

There are two RTC devices defined in the system. One is inside DART-SD410 PMIC chip and the second is on VART-SD410CustomBoard.
The main RTC device is DS1307 that is assembled on VART-SD410CustomBoard. It can be accessed via console in the following manner:

$ su
# cd /sys/class/rtc/rtc0
# cat date
Output similar to 2000-01-01
# cat time
Output similar to 00:00:36

To set the timezone use:

# setprop persist.sys.timezone "America/Chicago"

To set the time and date use:

# date -s 20160119.122100
The format is YYYYMMDD.HHmmss

To read back from the RTC0 device use:

# cat date
Output is 2016-01-19
# cat time
Output is 18:21:04
Pay attention that RTC stores time without timezone offset

You can use CR1225 lithium cell to run the RTC clock, insert it into battery holder JBT1.
Set the time and remove the power.
Wait for 5 minutes, plug the power in and verify RTC is still running.