create a time locale table
timtbl [ specfile ]
The utility timtbl is provided to allow new LC_TIME
locales to be defined.
It reads a specification file, which contains definitions of the
way in which time and date information is presented for a particular
locale, and produces a binary table file, to be read by
which determines the behavior of the
The information supplied in the specification file consists of lines
in the following format:
item = string
The ``='' can be separated from the item and string fields by zero or
more space or tab characters.
The following values are meaningful for item:
The string is a sequence of characters surrounded by quotes (").
Characters within the string can be specified both literally
and using ``\'' escapes; the following three strings are equivalent:
specification of the format string for representing the date.
It will contain ``%'' directives representing variable items
such as the month number, as used in the format string for
specification of the format string for representing the time of day.
string indicating 12-hour clock times before midday, for example ``AM''.
string indicating 12-hour clock times after midday, for example ``PM''.
string for formatting combined date and time.
full name of the first day of the week (Sunday).
full name of the seventh day of the week.
abbreviated name of the first day of the week, for example ``Sun''.
abbreviated name of the seventh day of the week.
full name of the first month in the Gregorian calendar.
full name of the twelfth month.
abbreviated name of the first month.
full name of the twelfth month.
"Tuesday" - literal
"\x54ue\x73da\x79" - hexadecimal escapes
"\124ue\163da\171" - octal escapes
The strings for the items DATE_FMT,
TIME_FMT and D_T_FMT
will also include ``%'' directives as detailed in the
manual page, to specify variable portions of the string.
All characters following a hash (#) are treated as a comment and ignored
up to the end of the line, unless the hash is within a quoted string.
The various items may be specified in any order.
If any items are not specified, a warning message will be produced,
and the null string ("") substituted.
The binary table output is placed in a file named ``time'',
within the current directory.
This file should be copied or linked to the correct place in the
setlocale file tree (see
To prevent accidental corruption of the output data, the file is created
with no write permission;
if the timtbl utility is run in a directory containing a
write-protected ``ctype'' file, the utility will ask if the existing file
should be replaced: any response other than ``yes'' or ``y'' will cause
timtbl to terminate without overwriting the existing file.
If the specfile argument is missing,
the specification information is read from the standard input.
If the input table file cannot be opened for reading, processing will
terminate with the error message, ``Cannot open specification file''.
Any lines in the specification file which are syntactically incorrect,
or contain an unrecognized value for the item,
will cause an error message to be issued to the standard error output,
specifying the line number on which the error was detected.
The line will be ignored, and processing will continue.
If a particular item is specified more than once, a warning
message will be produced, and processing will continue.
If the specification file does not contain specifications for all possible
items, a warning message will be produced.
If the output file, time, cannot be opened for writing,
processing will terminate with the error message, ``Cannot create table file''.
Any error conditions encountered will cause the program to exit with
a non-zero return code;
successful completion is indicated with a zero return code.
The strings D_FMT, T_FMT, AM_STR and
PM_STR may be used as alternatives to DATE_FMT,
TIME_FMT, F_NOON and A_NOON
respectively, if required.
These alternatives are provided for consistency with the
identifiers used by
timtbl is not part of any currently supported standard;
it is an extension of AT&T System V provided by The Santa Cruz
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003