Difference between revisions of "RTC"
From FriendlyELEC WiKi
(Created page with "查看中文 ===S5P4418/S5P6818=== Use the following command to see the GPIO pins.<br /> <syntaxhighlight lang="bash"> </syntaxhighlight>") |
(→S5P4418/S5P6818) |
||
Line 1: | Line 1: | ||
[[RTC/zh|查看中文]] | [[RTC/zh|查看中文]] | ||
− | + | ==S5P4418/S5P6818== | |
− | + | ===Read current datetime=== | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
+ | sudo hwclock -r -f /dev/rtc0 | ||
+ | </syntaxhighlight> | ||
+ | The output results are summarized below: <br /> | ||
+ | Tue 01 Sep 2009 12:07:52 AM UTC .371098 seconds | ||
+ | ===Set and save datetime=== | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo date -s "2019-10-09 17:00:00” | ||
+ | sudo hwclock -w -f /dev/rtc0 | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 09:12, 9 October 2019
1 S5P4418/S5P6818
1.1 Read current datetime
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 Set and save datetime
sudo date -s "2019-10-09 17:00:00” sudo hwclock -w -f /dev/rtc0