Skip to content

TIME Windows Command Guide

The Windows time command is a powerful tool for managing time settings on your computer. With this command, you can easily set the system time, display the current time, and even synchronize the time with a time server. By mastering the time command, you can ensure that your computer’s clock is always accurate and in sync with the rest of the world.

Terminal window
time [/t | /p | /it] [command]
OptionDescription
/TDisplays the current time setting only.
/PPrompts you to press any key before showing the current time setting.
/ITIgnores any key press.
ParameterDescription
commandSpecifies the command you want to run with the time settings. This parameter is optional.
Terminal window
time dir /s

Measures the execution time of the “dir /s” command.

Measure the Execution Time of a Batch Script

Section titled “Measure the Execution Time of a Batch Script”
Terminal window
time my_script.bat

Measures the execution time of a batch script named “my_script.bat”.

Terminal window
time my_program.exe

Measures the execution time of a program named “my_program.exe”.

Terminal window
time

Displays the current system time.

Measure the Execution Time of a System Restart

Section titled “Measure the Execution Time of a System Restart”
Terminal window
time shutdown /r /t 0

Measures the execution time of a system restart with a countdown of 0 seconds.

Measure the Performance of a Software Installation

Section titled “Measure the Performance of a Software Installation”
Terminal window
time chocolatey install firefox

Measures the performance of installing Firefox using Chocolatey package manager.

Measure the Time Taken to Connect to a Remote Server

Section titled “Measure the Time Taken to Connect to a Remote Server”
Terminal window
time telnet remote_server_ip

Measures the time taken to establish a connection to a remote server via Telnet.

To use the time command in Windows, execute the following command:

Terminal window
time

How can I display the current time in Windows CMD?

Section titled “How can I display the current time in Windows CMD?”

To display the current time in Windows CMD, use the following command:

Terminal window
time /t

How can I change the system time in Windows using CMD?

Section titled “How can I change the system time in Windows using CMD?”

To change the system time in Windows using CMD, you can use the following command (note: you need administrative privileges to change the system time):

Terminal window
time <hh:mm:ss>

How do I set a specific time in Windows CMD?

Section titled “How do I set a specific time in Windows CMD?”

To set a specific time in Windows CMD, you can use the following command:

Terminal window
time <hh:mm:ss>

How can I adjust the time format in Windows CMD?

Section titled “How can I adjust the time format in Windows CMD?”

To adjust the time format in Windows CMD, you can use the following command:

Terminal window
time /t

How do I get help with the time command in Windows CMD?

Section titled “How do I get help with the time command in Windows CMD?”

To get help with the time command in Windows CMD, you can use the following command:

Terminal window
time /?
  1. To display the current system time.
  2. To set the system time to a specific value.
  3. To measure the time taken to execute a command or a batch file.
  4. To schedule tasks to run at specific times by using the AT command in conjunction with the TIME command.
  5. To display or modify the system time format.