time(CMD) 19 June 1992 time(CMD) Name time - display the system time or sets your computer's internal clock Syntax time [hours:[minutes[:seconds[.hundredths]]][a|p]] To display the current time or to display a prompt by which you can change the current time, use the following syntax: time Description MS-DOS uses time information to update the directory whenever you create or change a file. Parameters hours Specifies the hour. Valid values are in the range 0 through 23. minutes Specifies minutes. Valid values are in the range 0 through 59. seconds Specifies seconds. Valid values are in the range 0 through 59. hundredths Specifies hundredths of a second. Valid values are in the range 0 through 99. a|p Specifies A.M. or P.M. for the 12-hour time format. If you type a valid 12-hour time but do not type a or p, time uses a (for A.M.). Notes Specifying an invalid time format If you specify the time in an invalid format, MS-DOS displays the follow- ing message and then waits for you to specify the time: Invalid time Enter new time:_ Changing the time format You can change the time format by changing the country setting in your CONFIG.SYS file. For more information, see the country(CMD) command. Depending on the country code, MS-DOS 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. Ensuring that MS-DOS prompts you for the time If you want MS-DOS to prompt you for the current time whenever you start your system, you can add the time command to your AUTOEXEC.BAT file. MS-DOS will automatically prompt you for the time and date if you do not have an AUTOEXEC.BAT file. Examples To set your computer's clock to 1:36 P.M., use either of the following commands: time 13:36 time 1:36p Related command For information about changing the current date, see the date(CMD) com- mand. For information about changing the time format, see the country(CMD) command.