2.7. Setting the System Time, Date, and Time Zone
You want to set the system time, date, and time zone.
Using a graphical user interface
From the Control Panel, open the Date and Time applet. This can also be accomplished by double-clicking the clock on the system tray or running timedate.cpl from the command line.
You can configure the year, month, day, and time on the Date & Time tab and the time zone on the Time Zone tab.
On Windows Server 2003, you can configure clock synchronization (Network Time Protocol (NTP) settings) from the Internet Time tab if the system is not part of a domain. If it is member of a domain, then the clock is synchronized automatically from an Active Directory domain controller.
Using a command-line interface
The following commands set the time to 11:02 p.m. and the date to November 1, 2005:
> time 23:02:00 > date 11/01/2005
The date format may vary depending on your locale.
Run this command to display the current date, time, and time zone:
> date /t & time /t & w32tm -tz
You can use this command to display time zone information from the registry:
> reg query \\
This command sets the SNTP server list:
> net time /setsntp:
> net time /setsntp:mytime.rallencorp.com,time.windows.com
This command queries the SNTP server:
> net time /querysntp
This command forces the local system to sync its time from the time source:
> net time /set
' This code displays ...