Timeformat

The timeformat option specifies the format in which you want to display and enter system time.

Windows operating systemsUse this option if you want to change the default time format for the language of the message repository you are using.

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systemsBy 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.

Note: The timeformat option does not affect the Web client. The Web client uses the time format for the locale that the browser is running in. If the browser is not running in a locale that Tivoli® Storage Manager supports, the Web client uses the time format for US English.

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.

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systems

Supported Clients

This option is valid for all clients.

Options File

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsPlace 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.

Windows operating systemsPlace 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.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-TIMEformat-- --format_number--------------------------------><

Parameters

format_number
Displays time in one of the formats listed here. Select the format number that corresponds to the format you want to use. When you include the timeformat option in a command, it must precede the fromtime, pittime, and totime options.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems0
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsUse the locale-defined time format (does not apply to Mac OS X).

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsThis is the default if the locale-specified format consists of digits, separator characters, and, if applicable, the AM or PM string.

1
23:00:00

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsThis is the default if the locale-specified format does not consist of digits, separator characters, and, if applicable, the AM or PM string.

2
23,00,00
3
23.00.00
4
12:00:00 A/P
5
A/P 12:00:00

Examples

Options file:
timeformat 4
Command line:
-time=3

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.

Additional considerations for specifying time and date formats

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.

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systems

Configuring date and time formats in the system locale configuration file

You can specify date and time formats by configuring them in your system’s locale file. If you specify time and date formats in the locale file, they must be defined using a subset of number-producing format specifiers that are supported by the C language strftime() function. You can use the following specifiers to set date and time formats in configuration settings for your locale.
Date specifiers
  • %Y - the year, in four digits. For example, 2011.
  • %y - the year, last two digits only. For example, 11 not 2011.
  • %m - the month, as a decimal number (1-12).
  • %d - the day of the month (1-31).

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.

Time specifiers
  • %H - the hour, in 24-hour form (00-23).
  • %I - the hour, in 12-hour form (00-12).
  • %M - minutes after the hour (00-59).
  • %S - seconds after the minute (00-59)
  • %p - adds the AM (before noon) or PM (after noon) indicator.

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.

Time format examples, configured in the locale settings

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsTo 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.

Table 1. Sample time format settings in the locale configuration (t_fmt line)
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).
Date format examples, configured in the locale settings

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsTo 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.

Table 2. Sample date format settings in the locale configuration (d_fmt line)
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.