cwbCO_GetSignonDate

Purpose

Retrieves the date and time of the current successful security validation.

Syntax

 
UINT CWB_ENTRY cwbCO_GetSignonDate(
                             cwbCO_SysHandle       system,
                             cwb_DateTime         *signonDateTime);

Parameters

cwbCO_SysHandle system - input
Handle returned previously from cwbCO_CreateSystem or cwbCO_CreateSystemLike. It identifies the iSeries™ system.
cwb_DateTime * signonDateTime - output
A pointer to a structure that will contain the date and time at which the current signon occurred, in the following format:
Bytes Content
1 - 2 Year (Example: 1998 = 0x07CF)
3 Month (January = 0x01)
4 Day (First day = 0x01;31st day = 0x1F)
5 Hour (Midnight = 0x00;23rd hour = 0x17)
6 Minute (On the hour = 0x00; 59th minute = 0x3B)
7 Second (On the minute = 0x00; 59th second = 0x3B)
8 One-hundredth of a second (on the second = 0x00; maximum = 0x63)
Note: On a given day, the maximum time is 23 hours, 59 minutes, and 59.99 seconds. Midnight is 0 hours, 0 minutes, and 0.0 seconds on the following day.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_API_HANDLE
Invalid system handle.
CWB_INVALID_POINTER
The pointer to the cwb_DateTime structure is NULL.
CWB_INV_BEFORE_VALIDATE
The user ID and password set in the specified system object have not been validated yet, so this information is not available.

Usage

You successfully must have called cwbCO_VerifyUserIDPassword, cwbCO_Signon, or cwbCO_Connect before using this API. If you want to ensure that the value returned is recent, you must either call cwbCO_VerifyUserIDPassword explicitly, or set the Validate Mode to CWBCO_VALIDATE_ALWAYS before you call cwbCO_Signon or cwbCO_Connect.