The offsetEpoch() function
Applies an offset to a time_t structure. It treats time_t as if it allows offsets, which are slightly outside the time_t specification, but it allows for easy usage.
Description
inline int32 offsetEpoch(int32 time, int32 sqlOffset, bool* errorFlag
= NULL)time specifies a value in time_t format.
sqlOffset specifies the time that is offset in minutes in the range of SQL_OFFSET_MIN to SQL_OFFSET_MAX inclusive.
errorFlag is an optional argument. If not NULL, it is set to true if isValidSqlOffset(sqlOffset) is false or isValidEpoch(time) is false or isValidEpoch(time+sqlOffset*60) is false. Otherwise, it is set to false.
Returns
t=time+sqlOffset*60, if *errorFlag is NULL and an exception is not thrown or if *errorFlag is not NULL and, after the call, *errorFlag is false.
Otherwise, the function returns an indeterminate value.
Throws
The function throws an opaque exception object if errorFlag is NULL and isValidSqlOffset(sqlOffset) is false, or isValidEpoch(time) is false or isValidEpoch(time+sqlOffset*60) is false.