The Windows CMD command for time is simply “time”. This command allows you to view the current system time, set the system time, and display a list of available time zones. It is a useful tool for system administrators who need to quickly check the system time or make changes to it. In this article, we will discuss the syntax, options, and user examples of the time CMD command.

Syntax of the Time CMD Command

The syntax of the time CMD command is as follows:

  • time [/t | /h | /s]
  • time [hh:mm:ss]

The first syntax is used to view the current system time. The second syntax is used to set the system time. The optional parameters are as follows:

/t Displays the current time without prompting for a new time.
/h Displays the current time in 12-hour format.
/s Sets the system time to the time specified.

User Examples of the Time CMD Command

Now that we have discussed the syntax and options of the time CMD command, let’s look at some user examples.

Example 1: View the Current System Time

To view the current system time, open the Command Prompt and type the following command:

  • time

The current system time will be displayed in the Command Prompt window.

Example 2: Set the System Time

To set the system time, open the Command Prompt and type the following command:

  • time hh:mm:ss

Replace hh:mm:ss with the desired time in 24-hour format. For example, to set the system time to 3:00 PM, type the following command:

  • time 15:00:00

The system time will be set to the specified time.

Conclusion

The time CMD command is a useful tool for system administrators who need to quickly check the system time or make changes to it. It has a simple syntax and allows you to view the current system time, set the system time, and display a list of available time zones. We have discussed the syntax, options, and user examples of the time CMD command in this article.

Leave a Reply