Board logo

标题: 与Internet时间服务器同步 [打印本页]

作者: weasel     时间: 2009-2-13 16:55    标题: 与Internet时间服务器同步
与Internet时间服务器同步


@echo off
cls
color 2f
cd /d %~dp0
Echo.&&Echo.正在与Internet时间服务器同步……&&Echo.===================================================
wget -N http://weasel.jgxx.com/wsqbbs/time.php >nul 2>nul
title 瓦斯曲-同步时间服务器工具
for /f "tokens=1,2 " %%i in (time.php) do date %%i &&time %%j
for /f "tokens=1,2 " %%i in (time.php) do echo 同步成功!!&& echo 服务器日期 %%i 系统日期 %date% &&echo 服务器时间 %%j 系统时间 %time%
del /f /s /q time.php >nul 2>nul
Echo.==================================================&&Echo.按任意键退出!!&&pause>nul 2>nul



作者: zhengqian529     时间: 2009-2-13 18:56
谁能够说一下wget 哪里得到? 第二次遇到 一天中

作者: HAT     时间: 2009-2-13 23:02    标题: Re 2楼

作者: 5551551     时间: 2009-2-21 20:53
方法好是好,可惜,这个网址得到的时间并不准确,要比标准时间快上11秒左右,不信各位可以打开
国家授时中心
http://www.time.ac.cn/stime.asp


和贴子中的这个:http://weasel.jgxx.com/wsqbbs/time.php

对比一下

贴中这个地址适用于对时间要求不是那么严格的方面,比如连网查软件是否到期之类