The decodeTimestamp (struct tm Output) function
Converts a Netezza Performance Server-encoded Timestamp value to struct tm. The function drops the microseconds after the last whole minute of the timestamp value.
Description
inline void decodeTimestamp(int64 encodedTimestamp, struct tm* result,
bool* errorFlag = NULL)
encodedTimestamp specifies a value that is encoded in Netezza Performance Server Timestamp format.
result specifies the structure where the decoded Timestamp is written, such that result->tm_hour, result->tm_min, result->tm_sec, result->tm_year, result->tm_mon, result->tm_mday, result->tm_yday, and result->tm_wday contain the appropriate fields in tm format. result->tm_isdst is set to -1. If applicable, all other fields of result are set to 0.
errorFlag is an optional argument. If not NULL, it is set to true if isValidTimestamp(encodedTimestamp) is false. Otherwise, it is set to false.
Throws
The function throws an opaque exception object if result is NULL or (errorFlag is NULL and isValidTimestamp(encodedTimestamp) is false).