命令行同步互联网时钟

windows的同步互联网时钟,经常会出现超时时间已过这种错误,后来发现重启windows timer服务后就正常了。但每次重启服务又比较麻烦,干脆写成一个批处理文件,运行一下就可以同步时钟了。代码如下:

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:"time.windows.com"
net start w32time
w32tm /config /update
w32tm /resync /rediscover
原文地址:https://www.cnblogs.com/goding/p/10767777.html