The timeformat option specifies the format in which you want to display and enter system time.
Use this option if you want to change the default time format for the language of the message repository you are using.
By default, the backup-archive and administrative clients obtain format information from the locale definition in effect at the time the client is called. Consult the documentation on your local system for details about setting up your locale definition.
You can use the timeformat option with the following commands:
When you include the timeformat option with a command, it must precede the fromtime, pittime, and totime options.
This option is valid for all clients.
Place this option in the client user-options file (dsm.opt). You can set this option on the Regional Settings tab, Time Format field of the Preferences editor.
Place this option in the client options file (dsm.opt). You can set this option on the Regional Settings tab, Time Format field of the Preferences editor.
Use the locale-defined time format (does not apply to Mac OS X).
This is the default if the locale-specified format consists of digits, separator characters, and, if applicable, the AM or PM string.
This is the default if the locale-specified format does not consist of digits, separator characters, and, if applicable, the AM or PM string.
This option is valid on the initial command line and in interactive mode. If you use this option in interactive mode, it affects only the command with which it is specified. When that command completes, the value reverts to the value at the beginning of the interactive session. This is the value from the dsm.opt file unless overridden by the initial command line or by an option forced by the server.
The date or time format you specify with this option must be used when using options that take date and time as input. Examples are: totime, fromtime, todate, fromdate, and pittime.
For example, if you specify the timeformat option as TIMEFORMAT 4, the value that you provide on the fromtime or totime option must be specified as a time such as 12:24:00pm. Specifying 13:24:00 would not be valid because TIMEFORMAT 4 requires an hour integer that is 12 or less. If you want to specify up to 24 hour values on an option, and if you want to use commas as separators, you must specify TIMEFORMAT 2.
In the date specifiers, you can specify only one year specifier. Do not specify both %Y and %y. The E modifier (a capital E) can precede the date specifiers to produce the locale's alternative form for the year, month, or day. If no alternative form exists, the E modifier is ignored. Separate the specifiers with a single 7-bit ASCII character. Commonly used separators include colons (:), commas (,), periods (.), hyphens (-), or forward slash (/) characters . Do not use multibyte characters as separators.
In the time specifiers, you can specify only one hour specifier. Do not specify both %I and %H.
The O modifier (a capital O) can precede the time specifiers to produce the locale's alternative form for the hour, minutes, or seconds. The O modifier cannot precede the %p specifier. Separate the specifiers with a single 7-bit ASCII character. Commonly used separators include colons (:), commas (,), or periods (.). Do not use multibyte characters as separators. Do not specify a separator between the %p specifier and the separator that precedes or follows it.
To set a particular time format, edit the configuration file for your locale and modify the t_fmt line to support your needs. Whatever time format you select applies both to output and to input. After the locale configuration file has been edited, the localedef command must be run to create the final locale file.
Example | Result |
---|---|
"%H:%M:%S" | Displays time in the form hh:mm:ss with hh ranging from 0 through 23. |
"%H,%M,%S" | Displays time in the form hh,mm,ss with hh ranging from 0 through 23. |
"%I,%M,13p" | Displays time in the form hh,mm,ssA/P with hh ranging from 1 through 12 and A/P is the local abbreviation for ante-meridian (AM in English) or post-meridian (PM in English). |
To set a particular date format, edit the configuration file and modify the d_fmt line as needed to support your needs. Whatever date format you select applies both to output and to input.
Example | Result |
---|---|
"%m/%d/%y" | Displays the date in the form MM/DD/YY. |
"%d.%m.%Y" | Displays the date in the form DD.MM.YYYY. |