Displays the system time or sets your computer's internal clock.
The operating system uses time information to update the directory whenever you create or change a file.
TIME /?
TIME [hours:[minutes[:seconds[.hundredths]]][A|P[M]]]
Display the current time or to display a prompt by which you can change the current time:
TIME [/T[IME]]
For information about changing the current date, see the
DATE command.
For information about changing the time format, see the
COUNTRY command.
NOW - Display Message with Current Date and Time.
TIMESERV - Time Service (resource kit).
W32TIME - Time Service (y2K compliant update for TIMESERV).
Equivalent Linux BASH commands:
date - Display or change the date & time.
If Command Extensions are disabled TIME will not support the /T switch.
Country or language CountryCode Date format Time format United States 001 01/03/1994 5:35:00.00p Czechoslovakia 042 03.01.1994 17:35:00 France 033 03.01.1994 17:35:00 Germany 049 03.01.1994 17:35:00 Latin America 003 03/01/1994 5:35:00.00p International English 061 03/01/1994 17:35:00.00 Portugal 351 03-01-1994 17:35:00 Finland 358 3.1.1994 17.35.00 Switzerland 041 03.01.94 17 35.00 Norway 047 03.01.94 17:35:00 Belgium 032 03/01/94 17:35:00 Brazil 055 03/01/94 17:35:00 Italy 039 03/01/94 17.35.00 United Kingdom 044 03/01/94 17:35:00.00 Denmark 045 03-01-94 17.35.00 Netherlands 031 03-01-94 17:35:00 Spain 034 3/01/94 17:35:00 Hungary 036 1994.01.03 17:35:00 Canadian-French 002 1994-01-03 17:35:00 Poland 048 1994-01-03 17:35:00 Sweden 046 1994-01-03 17.35.00 Country or language CountryCode Date format Time format
The Country Code is a user setting in the registry:
[HKEY_CURRENT_USER\Control Panel\International] "iCountry"="44"
The Country Code can be read using REG as:
FOR /F "TOKENS=2,3*" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International\iCountry"') DO (FOR %%G IN (%%A) DO (SET v_country=%%G))
The time separator is also a registry setting:
[HKEY_CURRENT_USER\Control Panel\International] "sTime"=":"
The time separator can be read using REG as:
FOR /F "TOKENS=2,3*" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International\sTime"') DO (FOR %%G IN (%%A) DO (SET v_time_sep=%%G))
If you specify the time in an invalid format, the operating system displays the message and then waits for you to specify the time:
Invalid time Enter new time:
You can change the TIME format by changing the COUNTRY setting in your CONFIG.SYS file. For more information, see the COUNTRY command. Depending on the country code, the operating system will display the time in the 12-hour format or the 24-hour format. If you are setting the time in the 12-hour format, be sure to specify P for hours after noon.
If you want the operating system to prompt you for the current time whenever you start your system, you can add the TIME command to your AUTOEXEC.BAT file. The operating system will automatically prompt you for the time and date if you do not have an AUTOEXEC.BAT file.
Prior to v3.30, DATE did not modify the computer system clock (You had to use SETUP disk).
To set your computer's clock to 1:36 P.M., use either of the commands:
TIME 13:36 TIME 1:36p
none.