BloombergLP::bdlt::EpochUtil::convertToDatetimeInterval

convertToDatetimeInterval overloads

Synopses

Declared in <bdlt_epochutil.h>

Return, as a DatetimeInterval, the relative time computed as the difference between the specified absolute datetime and the epoch.

static
DatetimeInterval
convertToDatetimeInterval(Datetime const& datetime);
» more...

Load into result the interval from the epoch to datetime.

static
int
convertToDatetimeInterval(
    DatetimeInterval* result,
    Datetime const& datetime);
» more...

Return Value

  • the relative time from the epoch to datetime
  • 0 on success, and a non-zero value otherwise

Parameters

NameDescription
datetimeabsolute datetime in UTC
resultdestination for the converted interval