User Tools

Site Tools


ntp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ntp [2018/05/06 08:44] midas_zhountp [2025/10/14 06:22] (current) – external edit 127.0.0.1
Line 5: Line 5:
         option timezone CST-8         option timezone CST-8
    config timeserver ntp    config timeserver ntp
 +        list server     0.cn.pool.ntp.org
 +        list server     1.cn.pool.ntp.org
 +        list server     2.cn.pool.ntp.org
 +        list server     3.cn.pool.ntp.org
         list server     0.openwrt.pool.ntp.org         list server     0.openwrt.pool.ntp.org
         list server     1.openwrt.pool.ntp.org         list server     1.openwrt.pool.ntp.org
Line 13: Line 17:
  
 各选项说明: 各选项说明:
-      timezone      本机所在时区+      timezone      本机所在时区, Asian/Shanghai CST-8
       list server      NTP服务器列表,可以增删       list server      NTP服务器列表,可以增删
       enabled        是否启用网络时间同步, 1--启用; 0--停止。       enabled        是否启用网络时间同步, 1--启用; 0--停止。
Line 23: Line 27:
  
 如果你需要立即同步时间,那么直接执行ntpd命令,比如: 如果你需要立即同步时间,那么直接执行ntpd命令,比如:
-   ntpd -n -d -p stdtime.gov.hk+   ntpd -n -d -q -p 1.cn.pool.ntp.org
 连接NTP服务器和同步时间可能需要等待一些时间,直到出现" setting time to ...",此时时间同步完成。 连接NTP服务器和同步时间可能需要等待一些时间,直到出现" setting time to ...",此时时间同步完成。
 {{:ntpd.jpg}} {{:ntpd.jpg}}
  
 最后执行date命令查看当前时间。 最后执行date命令查看当前时间。
ntp.1525596289.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki