This page was last modified 14:26, 1 June 2020 by Mars2000you. Based on work by Rderooy.



Displays the time and optionally modifies it.

On MSX2 and higher machines, the time is read from the SRAM of the Real Time Clock (RTC) and will be saved on this SRAM when modified.


TIME <Time>


<Time> needs to be entered under MSX-DOS 1 in the format HH:MM:SS possibly followed by a or p. HH for the hour digits, MM for the minutes digits, SS for the seconds digits, a for AM (ante meridiem), p for PM (post meridiem). Without a or p, it is assumed to be a 24 hour format otherwise it's a 12 hour format.

Under MSX-DOS 2 / Nextor:

  • the format is HH:MM:SS:CC possibly followed by a or p. HH for the hour digits, MM for the minutes digits, SS for the seconds digits, CC for centi-seconds, a for AM (ante meridiem), p for PM (post meridiem)
  • by default, the computer displays the hour in the 12 hour format, but it can be changed to the 24 hour format with the SET TIME 24 command
  • the : separator can be replaced by a small space (with the spacebar), a big space (with the TAB key) or any of these other separators: , - . /
  • it's not useful to enter the centi-seconds as they will not be displayed and are always frozen to 00
  • you can modify only a part of the time (only the hour or only the hour and the minutes), the missing parts will remain at their current setting

If you don't specify the time after the TIME command, the system will display the current time (always 12:00:00.00a by default on MSX1) and will invite you to enter a new time. If you then simply press RETURN, the current time will not be modified. In case of an invalid entry, an error message will be displayed and you will be again invited to enter a new time.


Under MSX-DOS 1

Current time is 9:06:36.00p
Enter new data:
A>TIME 08:45:25p

Under MSX-DOS 2 / Nextor

Current time is 9:06:36p
Enter new time:
A>TIME 10-50-30-23
A>TIME 16:45

Utility on emulators

Except for testing, it's not really useful to modify the current time with TIME on an emulator, because it will automatically synchronize the clock of the emulated MSX2 (and higher) machine to the clock of the host system (Windows, Mac OS, Linux, ...) when making some actions (which vary according to the emulator used). Besides, it does not work with emulated MSX1 machines.

Related to

DATE, SET, TIME (Environment Variable)


MSX-DOS 1 with COMMAND.COM, MSX-DOS 2 / Nextor with COMMAND2.COM v2.20 and higher