Adjust Time (QWCADJTM) API


  Required Parameter Group:

1 Adjustment variable Input Char(*)
2 Length of adjustment variable Input Binary(4)
3 Adjustment format name Input Char(8)
4 Error Code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: YES

The Adjust Time (QWCADJTM) API will adjust the time by increasing or decreasing the time-of-day clock to a maximum change of plus or minus two hours.

Note: A time-of-day adjustment will remain active until completed unless one of the following occurs:

The Retrieve System Time Information(QWCRTVTM) API can be used to determine if an adjustment to the time-of-day clock is allowed and can be used to retrieve information on any time adjustment that may be currently active.


Authorities and Locks

User Special Authority
*ALLOBJ

Required Parameter Group

Adjustment variable
INPUT; CHAR(*)

The variable that is used to specify the time adjustment details.

Length of adjustment variable
INPUT; BINARY(4)

The length of the adjustment variable. Minimum length is 9 bytes.

Adjustment format name
INPUT; CHAR(8)

The format name of the adjustment variable. The possible format name is:

ADJT0100
Basic time adjustment details.

See Format of Adjustment Variable for more information.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format of Adjustment Variable

The following table describes the order and format of the data that is specified in the adjustment variable. For detailed descriptions of the fields in this table, see Field Descriptions.

ADJT0100

Offset Type Field
Dec Hex
0 0 BINARY(8), UNSIGNED Time adjustment amount
8 8 CHAR(1) Time adjustment direction

Field Descriptions

Time adjustment amount. The time value which specifies the amount of time in microseconds by which the time-of-day clock will be increased or decreased.

Note: The maximum value for the time adjustment interval is two hours.

Time adjustment direction. The direction of the time-of-day clock adjustment for the system.

0 Increase time of day.
1 Decrease time of day.

Error Messages

The following messages may be sent from this function:

Message ID Error Message Text
CPF1890 E *ALLOBJ authority required for requested operation.
CPF18C5 E Time adjustment not valid.
CPF24B4 E Severe error while addressing parameter list.
CPF3C12 E Length of data is not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C36 E Number of parameters, &1, entered for this API was not valid.
CPF3C3C E Value for parameter &1 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.



API introduced: V5R3

[ Back to top | Date and Time APIs | APIs by category ]