Difference between revisions of "RTC/zh"

From FriendlyELEC WiKi
Jump to: navigation, search
(设置时间并保存)
(S5P4418/S5P6818)
Line 1: Line 1:
 
[[RTC|English]]
 
[[RTC|English]]
==S5P4418/S5P6818==
+
==S5P4418/S5P6818/RK3399==
 
===读取当前时间===
 
===读取当前时间===
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 10: Line 10:
 
===设置时间并保存===
 
===设置时间并保存===
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo date -s "2019-10-09 17:00:00"
+
sudo date -s "2020-04-20 11:03:00"
 
sudo hwclock -w -f /dev/rtc0
 
sudo hwclock -w -f /dev/rtc0
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 03:04, 20 April 2020

English

1 S5P4418/S5P6818/RK3399

1.1 读取当前时间

sudo hwclock -r -f /dev/rtc0

The output results are summarized below:
Tue 01 Sep 2009 12:07:52 AM UTC .371098 seconds

1.2 设置时间并保存

sudo date -s "2020-04-20 11:03:00"
sudo hwclock -w -f /dev/rtc0