一、使用windows对时
①添加internet时间服务器地址
单击“开始→运行”,键入“Regedit”后回车,打开注册表编辑器,依次展开HKEY_LOCAL_MACHINE/SOFT-WARE/Microsoft/Windows/CurrentVersion/DateTime/Servers分支
Time.apple.com
ntp.sjtu.edu.cn
time.pool.aliyun.com
在windows时间设置中选择以上几个地址,点立即更新。
②定义时间同步间隔:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient的「SpecialPollInterval」默认设定为604800(默认7天),可改为3600(每小时)
二、将windows系统作为NTP服务器运行
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer内的「Enabled」设定为1,打开NTP服务器功能
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags设定为5,该设定强制主机将它自身宣布为可靠的时间源
完成以上,重启windows time服务</