1 | Receiver variable | Output | Char(*) |
2 | Length of receiver variable | Input | Binary(4) |
3 | Format name | Input | Char(8) |
4 | Number of fields to return | Input | Binary(4) |
5 | Key of fields to return | Input | Array(*) of Binary(4) |
6 | Error Code | I/O | Char(*) |
The Retrieve System Time Information (QWCRTVTM) API retrieves the current Coordinated Universal Time and time adjustment information.
None
The variable that is used to return the time information.
The length of the receiver variable. This must be a minimum of 8 bytes.
The format of the information to be returned in the receiver variable. The possible format name is:
RTTM0100 | Basic time information. See Format of Receiver Variable for more information. |
The number of fields to return in the specified format.
The list of fields to be returned in the specified format. For a list of valid fields, see Valid Keys.
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
The following table describes the order and format of the data that is returned in the receiver variable. For detailed descriptions of the fields in this table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Bytes returned |
4 | 4 | BINARY(4) | Bytes available |
8 | 8 | BINARY(4) | Offset to key fields |
12 | C | BINARY(4) | Number of fields returned |
16 | 10 | CHAR(*) | Reserved |
These fields repeat, in the order listed, for the number of key fields returned. | BINARY(4) | Length of field information returned | |
BINARY(4) | Key field | ||
CHAR(1) | Type of data | ||
CHAR(3) | Reserved | ||
BINARY(4) | Length of data | ||
CHAR(*) | Data | ||
CHAR(*) | Reserved |
Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.
Bytes returned. The number of bytes of data returned.
Data. The data returned for the key field.
Key field. The field returned. See Valid Keys for the list of valid keys.
Length of data. The length of the data returned for the field.
Length of field information returned. The total length of information returned for this field. This value is used to increment to the next field in the list.
Number of fields returned. The number of fields returned to the application.
Offset to key fields. The offset in bytes from the beginning of the receiver to the key fields array entry.
Reserved. An unused field.
Type of data. The type of data returned.
C | The data is returned in character format. |
B | The data is returned in binary format. |
The following indicates the valid keys for the formats specified. See Key Field Descriptions for the descriptions of the valid key attributes.
Key | Type | Description |
---|---|---|
0101 | CHAR(8) | Coordinated Universal Time |
0201 | CHAR(1) | Time adjustment status |
0202 | CHAR(1) | Time adjustment direction |
0203 | BINARY(8), UNSIGNED | Time adjustment amount |
0204 | BINARY(8), UNSIGNED | Time adjustment duration |
0205 | CHAR(1) | Time adjustment supported |
Coordinated Universal Time. The value of the time-of-day clock which is returned as the Coordinated Universal Time (UTC) for the system. The UTC is returned as a system time-stamp.
Time adjustment amount. The time value which specifies the remaining amount of time, in microseconds, by which the time-of-day clock will be increased or decreased. If a time adjustment is not active, this field will be hex zeros.
Time adjustment direction. The direction of the time-of-day clock adjustment for the system. If a time adjustment is not active, this field will be blank.
Time adjustment duration. The time value which provides an estimate of the amount of time, in microseconds, required in order to complete the time-of-day clock adjustment. If a time adjustment is not active, this field will be hex zeros.
Time adjustment status. The status of the time-of-day clock adjustment.
Time adjustment supported. The availability of the time-of-day clock adjustments for the system.
The following messages may be sent from this function:
Message ID | Error Message Text |
---|---|
CPF1866 E | Value &1 for number of fields to return not valid. |
CPF1867 E | Value &1 in list not valid. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C21 E | Format name &1 is not valid. |
CPF3C24 E | Length of the receiver variable is not valid. |
CPF3C36 E | Number of parameters, &1, entered for this API was not valid. |
CPF3CF1 E | Error code parameter not valid. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF9821 E | Not authorized to program &1 in library &2. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Date and Time APIs | APIs by category |