Load into result the seconds from the epoch to datetime.
Synopsis
Declared in <bdlt_epochutil.h>
static
int
convertToTimeT(
std::time_t* result,
Datetime const& datetime);
Description
Load into the specified result the relative time computed as the difference between the specified absolute datetime and the epoch. Return 0 on success, and a non‐zero value (with no effect on result) if datetime ‐ epoch() < DatetimeInterval() or datetime cannot be represented in the destination format on all supported platforms (i.e., the computed *result is not representable as a 32‐bit int). Note that datetime is assumed to use Coordinated Universal Time (UTC) as a reference.
Return Value
0 on success, and a non‐zero value otherwise
Parameters
Name |
Description |
result |
destination for seconds since the epoch |
datetime |
absolute datetime in UTC |
Created with MrDocs