BloombergLP::balber::BerUtil_Iso8601ImpUtil::putTimeValue

Encode a time in ISO 8601 form to streamBuf.

Synopsis

Declared in <balber_berutil.h>

static
int
putTimeValue(
    std::streambuf* streamBuf,
    bdlt::Time const& value,
    BerEncoderOptions const* options);

Description

If the specified options is 0, use 3 decimal places of fractional second precision, otherwise use the number of decimal places specified by the datetimeFractionalSecondPrecision attribute of the options. Return 0 on success and a non-zero value otherwise. The operation succeeds if all bytes of the ISO 8601 representation of the value are written to the streamBuf without the write position becoming unavailable.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
streamBufoutput stream buffer
valuevalue to encode
optionsencoder options (0 for defaults)