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-08-06 03:02
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Is there a command or script to sync with the server time? View 850 Replies 1
Original Poster Posted 2007-10-13 11:09 ·  中国 湖北 武汉 电信
初级用户
Credits 26
Posts 9
Joined 2007-08-09 21:02
18-year member
UID 94897
Gender Male
Status Offline
For a client machine, how can I use a startup batch file to sync time with the server?
For example, the server is 192.168.1.1, and the client is 192.168.1.10
Floor 2 Posted 2007-10-13 11:56 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Check the server time:
C:\>net time /?
The syntax of this command is:


NET TIME
| /RTSDOMAIN]
/QUERYSNTP
/SETSNTP


Change the local machine time:
C:\>time /?
Displays or sets the system time.

TIME

Type TIME with no parameters to display the current time setting and a prompt
for a new one. Press ENTER to keep the same time.

If Command Extensions are enabled the TIME command supports
the /T switch which tells the command to just output the
current time, without prompting for a new time.
Forum Jump: