中国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-06 01:57
48,039 topics / 350,124 posts / today 2 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Is there a command or script to sync with the server time?
Printable Version  848 / 1
Floor1 leewger Posted 2007-10-13 11:09
初级用户 Posts 9 Credits 26
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
Floor2 HAT Posted 2007-10-13 11:56
版主 Posts 5,017 Credits 9,023
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.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023