讨论广场 问答详情
openhatmony 5.0.1 时间同步的情况下,关闭WIFI网络并修改日期和时间,恢复网络后时间和日期不同步
m0_73599394 2025-05-20 11:51:27
97 评论 分享

openhatmony 5.0.1 时间同步的情况下,关闭WIFI网络并修改日期和时间,恢复网络后时间和日期不同步

97 评论 分享
相关文件下载
time.7z
2.61 MB
下载
写回答
全部评论(6)
2 楼

1.获取下persist.time.synctimefromntp,这个需要为true

    param get persist.time.synctimefromntp

2.确保当前网络可以访问时钟同步服务器

    ping ntp.aliyun.com

 

2025-05-20 13:56:06
2025-05-20 16:41:10
引用:“文字较乱,图片清晰点 ”
param set persist.time.synctimefromntp true 之后再联网试试
2025-05-20 16:41:10
2025-05-20 16:18:24
文字较乱,图片清晰点
2025-05-20 16:18:24
2025-05-20 16:04:59
--------------正确时间-------------- # param get |grep "persist.time." persist.time.timezone = Asia/Shanghai persist.time.ntpserver = ntp.aliyun.com persist.time.ntpserver_specific = persist.time.auto_time = ON persist.time.synctimefromntp = true persist.time.auto_restore_timer_apps = # cat proc/driver/rtc rtc_time : 07:58:21 rtc_date : 2025-05-20 alrm_time : 14:49:00 alrm_date : 2025-04-13 alarm_IRQ : no alrm_pending : no update IRQ enabled : no periodic IRQ enabled : no periodic IRQ frequency : 1 max user IRQ frequency : 64 24hr : yes # # # # ping ntp.aliyun.com Ping ntp.aliyun.com (203.107.6.88): 56(84) bytes. 64 bytes from 203.107.6.88: icmp_seq=1 ttl=51 time=77 ms 64 bytes from 203.107.6.88: icmp_seq=2 ttl=51 time=78 ms 64 bytes from 203.107.6.88: icmp_seq=3 ttl=51 time=81 ms --- 203.107.6.88 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss round-trip min/avg/max = 77/78/81 ms # # # # # ----------------------关闭wifi---修改为非当前日期---打开wifi并连接上热点-------------------- /bin/sh: ------------------------------------------: inaccessible or not found # # # ping ntp.aliyun.com Ping ntp.aliyun.com (203.107.6.88): 56(84) bytes. 64 bytes from 203.107.6.88: icmp_seq=1 ttl=51 time=679 ms 64 bytes from 203.107.6.88: icmp_seq=2 ttl=51 time=78 ms 64 bytes from 203.107.6.88: icmp_seq=3 ttl=51 time=69 ms --- 203.107.6.88 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss round-trip min/avg/max = 69/275/679 ms # cat proc/driver/rtc rtc_time : 19:50:35 rtc_date : 2026-04-27 alrm_time : 14:49:00 alrm_date : 2025-04-13 alarm_IRQ : no alrm_pending : no update IRQ enabled : no periodic IRQ enabled : no periodic IRQ frequency : 1 max user IRQ frequency : 64 24hr : yes #
time11.7z
下载
2025-05-20 16:04:59
2025-05-20 15:48:10
原本获取不到persist.time.synctimefromntp;设置系统参数后并重新打开wlan热点连接后可以还是 ping ntp.aliyun.com;但时间还是不对
2025-05-20 15:48:10

日志见附件

2025-05-20 11:51:51