8.26 GET_GMT_TIMESTAMP

Valid For

Extract and Replicat

Description

Use the GET_GMT_TIMESTAMP function to retrieve the operation commit timestamp in GMT format. This function requires compiling with Version 2 usrdecs.h or later.

Syntax

#include "usrdecs.h"
short result_code;
record_def record;
ERCALLBACK (GET_GMT_TIMESTAMP, &record, &result_code);

Buffer

typedef struct
{
char *table_name;
char *buffer;
long length;
char before_after_ind;
short io_type;
short record_type;
short transaction_ind;
int64_t timestamp;
exit_ts_str io_datetime;
short mapped;
short source_or_target;
/* Version 2 CALLBACK_STRUCT_VERSION   */
char requesting_before_after_ind;
} record_def;

Input

None

Output

timestamp

The returned 64-bit I/O timestamp in GMT format.

io_datetime

A null-terminated string containing the local I/O date and time:

YYYY-MM-DD HH:MI:SS.FFFFFF

The format of the datetime string is in the session character set.

Return Values

EXIT_FN_RET_INVALID_CONTEXT
EXIT_FN_RET_OK