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

Name

Description

result

receives the local time and UTC offset

resultValidity

receives the validity of localTime

transitionIter

receives the characterizing transition iterator

localTime

local date‐time to resolve

dstPolicy

daylight‐saving policy for interpreting localTime

timeZone

well‐formed zoneinfo providing transition data

Created with MrDocs