linux 系统rtc时间查看、同步配置及同步指令

date查看系统时间date -s "2023-06-26 23:05:00"设置系统时间,月日时分年.秒,这里就是设置为01月13日23点48分2

date  //查看系统时间
date -s "2023-06-26 23:05:00"  //设置系统时间,月/日/时/分/年/.秒,这里就是设置为01月13日23点48分2022年01秒
hwclock --show  //查看硬件时间(也就是rtc时间)
hwclock -w     // 同步时间到RTC(把系统时间写到RTC芯片):    
hwclock -s     //同步时间到系统(把RTC芯片时间写到系统时间)

自动同步配置:

Device Drivers  --->      
 [ * ]Real Time Clock  --->  
 [ * ]Set system time from RTC on startup and resume    (自动同步时间) 
 <*>   Philips PCF8563/Epson RTC8564          (CONFIG_RTC_DRV_PCF8563)

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754877136a5211918.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信