China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-23 22:24
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Synchronize with an Internet time server View 1,518 Replies 3
Original Poster Posted 2009-02-13 16:55 ·  中国 四川 成都 电信
初级用户
★★
Credits 118
Posts 66
Joined 2006-08-18 16:04
19-year member
UID 60797
Gender Male
Status Offline
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


Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
HAT +2 2009-02-22 00:09
Floor 2 Posted 2009-02-13 18:56 ·  美国 华盛顿州 金 雷德蒙德 Microsoft
初级用户
★★
Credits 100
Posts 93
Joined 2009-01-14 15:04
17-year member
UID 136661
Gender Male
From 湖南
Status Offline
Who can tell me where to get wget? Encountered for the second time in a day
Floor 3 Posted 2009-02-13 23:02 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Batch Processing Room Attachment Collection Special Posthttp://www.cn-dos.net/forum/viewthread.php?tid=25914
Floor 4 Posted 2009-02-21 20:53 ·  中国 上海 电信
初级用户
Credits 37
Posts 39
Joined 2007-12-07 22:44
18-year member
UID 105020
Gender Male
Status Offline
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
Forum Jump: