TIME — Display or set the time

Synopsis

TIME [/?] [/F string] [/LOCALFORMAT] [/UTC] [/N/L] [time]

Options

/?
Display command syntax information.
/N
Do not prompt for a new time.
/F
Specify a format string for the time.

Note: The TIME command always precedes the time with the text of system message number 1051. This may not be desired. To print the time without any extraneous text, use the SAYDATE command from the OS/2 Command Line Utilities version 2.0.

/LOCALFORMAT
Use the local country's date and time formats.
/UTC
Display the time in UTC rather than local time, and default to UTC if the input time does not have an explicit timezone.

Description

The TIME command either displays or sets the current time. Without an argument, it displays the current time to standard output, and prompts for the new time from its standard input, to which it then sets the clock. If the /N option is used, the prompt for a new time is suppressed and the time is not changed. If an argument is supplied, that is used as the new time, and again no prompt is issued.

The time is displayed in the standard ISO 8601 format, with a full 4-digit year, unless the /L option is used. If the /L option is used, the format of the time is determined by the current country, which on OS/2 Warp is determined by the COUNTRY.SYS file and the COUNTRY directive in CONFIG.SYS.

If the time passed on the command, or entered at the prompt, is not in the standard ISO 8601 format, TIME will attempt to parse it as if it is in the format determined by the current country.

DATE


The 32-bit Command Interpreter is © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.