The encodeTimestamp (time_t Input Format) function
Converts a time_t value to a Netezza Performance Server-encoded Timestamp. Encodes the value in UTC and applies no offsets. It also adds zero microseconds to the encoded value.
Description
The function
has the following syntax:
inline void encodeTimestamp(int32 ts, int64* encodedTimestamp, bool*
errorFlag = NULL)
ts specifies the time_t Timestamp value.
encodedTimestamp specifies the parameter in which to record the Timestamp that is encoded in Netezza Performance Server format.
errorFlag is an optional argument. If not NULL, it is set to true if isValidEpoch(ts) is false. Otherwise, it is set to false.
Throws
The function throws an opaque exception object if encodedTimestamp is NULL or (errorFlag is not NULL and isValidEpoch(ts) is false).