BloombergLP::baltzo::TimeZoneUtilImp::initLocalTime

Load, into the specified result, the local date-time value -- including the local date, time, and resolved UTC offset -- indicated by the specified localTime in the time zone indicated by the specified timeZoneId, using the specified dstPolicy to interpret whether or not localTime represents a daylight-saving time value, and using time zone information supplied by the specified cache. Load, into the specified resultValidity the value indicating the whether localTime is unique, ambiguous but valid, or invalid. Return 0 on success, and a non-zero value otherwise. A return status of ErrorCode::k_UNSUPPORTED_ID indicates that timeZoneId is not recognized. The behavior is undefined unless the result of the initialization falls within the supported epoch.

Synopsis

Declared in <baltzo_timezoneutilimp.h>

static
int
initLocalTime(
    bdlt::DatetimeTz* result,
    LocalTimeValidity::Enum* resultValidity,
    bdlt::Datetime const& localTime,
    char const* timeZoneId,
    DstPolicy::Enum dstPolicy,
    ZoneinfoCache* cache);