BloombergLP::baltzo::TimeZoneUtilImp::resolveLocalTime

Resolve localTime in timeZone using dstPolicy.

Synopsis

Declared in <baltzo_timezoneutilimp.h>

static
void
resolveLocalTime(
    bdlt::DatetimeTz* result,
    LocalTimeValidity::Enum* resultValidity,
    Zoneinfo::TransitionConstIterator* transitionIter,
    bdlt::Datetime const& localTime,
    DstPolicy::Enum dstPolicy,
    Zoneinfo const& timeZone);

Description

Load, into the specified result, the local time and UTC offset of the specified localTime in the specified timeZone, using the specified dstPolicy to interpret whether or not localTime represents a daylight-saving time value; load into the specified resultValidity an indication of whether localTime is valid and unique, valid but ambiguous, or invalid; load into the specified transitionIter an iterator pointing to the transition that characterizes the attributes of localTime. The behavior is undefined unless ZoneinfoUtil::isWellFormed(timeZone) is true and the result of the resolution falls within the supported epoch.

Parameters

NameDescription
resultreceives the local time and UTC offset
resultValidityreceives the validity of localTime
transitionIterreceives the characterizing transition iterator
localTimelocal date-time to resolve
dstPolicydaylight-saving policy for interpreting localTime
timeZonewell-formed zoneinfo providing transition data