BloombergLP::bslmt::SaturatedTimeConversionImpUtil::toTimeT

Assign src to *dst as a time_t, saturating to range.

Synopsis

Declared in <bslmt_saturatedtimeconversionimputil.h>

static
void
toTimeT(
    std::time_t* dst,
    bsls::Types::Int64 const src);

Description

Assign to the specified dst the value of the specified src, and if src is less than the lowest representable time_t value, set dst to the minimum time_t value, and if src is greater than the highest representable time_t value, set dst to the maximum time_t value.

Parameters

NameDescription
dstdestination time_t to assign
srcsource integral time value to convert