Description
Converts an integer time value returned by
clock seconds
or
clock scan
to human-readable form. If the
-format
option is present, the next argument is a string that describes how the date and time are to be
formatted. Field descriptors consist of a % followed by a field descriptor value. All other characters are
copied to the result. Valid field descriptors are:
%%
Insert a %.
%a
Abbreviated weekday name (Mon, Tue,
etc
).
%A
Full weekday name (Monday, Tuesday,
etc
).
%b
Abbreviated month name (Jan, Feb,
etc
).
%B
Full month name.
%c
Locale specific date and time.
%d
Day of month (01–31).
%H
Hour in 24-hour format (00–23).
%I
Hour in 12-hour format (00–12).
%j
Day of year (001–366).
%m
Month number (01–12).
%M
Minute (00–59).
%p
AM/PM indicator.
%S
Seconds (00–59).
%U
Week of year (01–52), Sunday is the first day of the week.
%w
Weekday number (Sunday=0).
%W
Week of year (01–52), Monday is first day of the week.
%x
Locale specific date format.
%X
Locale specific time format.
%y
Year without century (00–99).
%Y
Year with century (
e.g.
, 1990).
%Z
Time zone name.
If the
-format
argument is not specified, the format string “
%a %b %d %H:%M:%S %Z %Y
” is used. If the
-gmt
argument is present, the next argument must be a boolean value which if true, specifies that the time will be
formatted as GMT. If false, then the local timezone will be used as defined by the operating environment.
Return values:
See above for return value.
Error codes:
NOTNONNEG
clock value
NOTBOOLEAN
boolean
*
clock scan
date string
[
-base
clock val
] [
-gmt
boolean
]
Description
Convert
date string
to an integer clock value (see
clock seconds
). This command can parse and convert
virtually any standard date/or time string, which can include standard time zone mnemonics. If only a time
is specified, the current date is assumed. If the string does not contain a time zone mnemonic, the local time
zone is assumed, unless the
-gmt
argument is true, in which case the clock value is calculated assuming that
the specified time is relative to GMT.
204