Xlate commands
The convert_date command converts between the hci supported date and time formats.
convert_date [-configure keyedlist] inType inData outType\ outLen
convert_date [-configure keyedlist]
convert_date -configure
-
inType
andoutType
entries must be one of the supported type codes. -
outLen
determines which of any optional components are included in the output data.
This command returns the converted string.
-configure
, make any temporary changes, and then change the settings back. The supported date and time codes are:
-
dt
: [CC]YYMMDD -
ed
: DDMM[CC]YY -
fd
: MM/DD/[CC]YY -
fe
: DD.MM.[CC]YY -
jd
: [[CC]YY]DDD (Julian) -
tm
: HHMM[SS][{+|-}ZZZZ] -
ts
: YYYYMMDDHHMM[SS][{+|-}ZZZZ] -
yd
: MMDD[CC]YY
Use any separator characters for fd
and
fe
input; the characters shown are used when those types
are specified as outType
The type codes are case insensitive. Any conversions that are incomplete use the current date and time as the source for any missing information. "Incomplete" indicates the output format has more information than the input.
For example, converting a dt
with a value
of 19930410 to a type ts
with a length of 12, results in
199304101415. This assumes the current time is 2:15 PM.
Time zones, when requested in the output format, are normalized to the local time zone. This is in accordance with any time zone shift that is specified in the input data.
If inData
is empty, then inType
is ignored and the output is formatted using only data
elements corresponding to the current date and time.
Example commands
convert_date -configure [list {FABRICATE 0}\
{RANGE {50 20 19}}]
convert_date -configure [list {ADDPREC 0}\
{DELIMIT {/ :}} {FABRICATE 1}]