The encodeTimestamp (timeval Input Format) function
Converts a struct timeval value to a Netezza Performance Server-encoded Timestamp.
Description
The function
has the following syntax:
inline void encodeTimestamp(const struct timeval& ts, int64*
encodedTimestamp, bool* errorFlag = NULL)
ts specifies the struct timeval Timestamp value.
encodedTimestamp specifies the parameter in which to record the Timestamp that is encoded in Netezza® format.
errorFlag is an optional argument. If not NULL, it is set to true if isValidTimeVal(ts) is false. Otherwise, it is set to false.
Throws
The function throws an opaque exception object if encodedTimestamp is NULL or (errorFlag is NULL and isValidEpoch(ts) is false).