中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-11 10:50
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Synchronize with an Internet time server
Printable Version  1,567 / 3
Floor1 weasel Posted 2009-02-13 16:55
初级用户 Posts 66 Credits 118
Synchronize with Internet Time Server


@echo off
cls
color 2f
cd /d %~dp0
Echo.&&Echo.Now synchronizing with Internet time server……&&Echo.===================================================
wget -N http://weasel.jgxx.com/wsqbbs/time.php >nul 2>nul
title Was Qv - Time Server Synchronization Tool
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 Synchronization successful!!&& echo Server date %%i System date %date% &&echo Server time %%j System time %time%
del /f /s /q time.php >nul 2>nul
Echo.==================================================&&Echo.Press any key to exit!!&&pause>nul 2>nul


Floor2 zhengqian529 Posted 2009-02-13 18:56
初级用户 Posts 93 Credits 100 From 湖南
Who can tell me where to get wget? Encountered for the second time in a day
Floor3 HAT Posted 2009-02-13 23:02
版主 Posts 5,017 Credits 9,023
Batch Processing Room Attachment Collection Special Posthttp://www.cn-dos.net/forum/viewthread.php?tid=25914
Floor4 5551551 Posted 2009-02-21 20:53
初级用户 Posts 39 Credits 37
The method is good, but unfortunately, the time obtained from this website is not accurate. It is about 11 seconds faster than the standard time. If you don't believe it, you can open the National Time Service Center http://www.time.ac.cn/stime.asp

and compare it with this one in the post: http://weasel.jgxx.com/wsqbbs/time.php

This address in the post is suitable for aspects where the time requirement is not so strict, such as checking whether the software is expired when connected to the network and so on
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023