BloombergLP::baltzo::ZoneinfoUtil

This struct provides a namespace for utility operations using a Zoneinfo object.

Synopsis

Declared in <baltzo_zoneinfoutil.h>

struct ZoneinfoUtil;

Static Member Functions

NameDescription
convertUtcToLocalTime Load, into the specified resultTime, the local date-time value, in the specified timeZone, corresponding to the specified utcTime, and load, into the specified resultTransition, an iterator referring to the first transition in timeZone whose transition-time is before utcTime. Return 0 on success, and baltzo::ErrorCode::k_OUT_OF_RANGE if resultTime would be outside of the legal range that a bdlt::DatetimeTz can represent. The behavior is undefined unless isWellFormed(timeZone) is true.
isWellFormed Return true if the specified timeZone is a well-formed Zoneinfo object (which can be used by other methods on this utility), and false otherwise. For a Zoneinfo to be considered well-formed all of the following must be true:
loadRelevantTransitions Load, into the specified firstResultTransition, an iterator referring to the transition describing the characteristics of local time in effect at the specified localTime in the specified timeZone; in instances where localTime is not both a unique and valid local time in timeZone, load, into the specified secondResultTransition, an iterator referring to a subsequent transition describing the alternative characteristics of local time that could also apply to localTime; finally load, into the specified resultValidity, the validity of localTime as being unique, ambiguous but valid, or invalid. If resultValidity is e_VALID_UNIQUE, then firstResultTransition and secondResultTransition will be loaded with the same transition, otherwise the returned transitions will be distinct with secondResultTransition referring to the transition immediately after firstResultTransition. The behavior is undefined unless isWellFormed(timeZone) is true, and firstResultTransition != secondResultTransition.