This class is a value‐semantic type holding a structured representation of the information contained in an Zoneinfo (or "Olson") time zone database for a single locale (e.g., "America/New_York"). The salient attributes of this type are the string identifier and the ordered sequence of ZoneinfoTransition objects.

Synopsis

Declared in <baltzo_zoneinfo.h>

class Zoneinfo;

Type Aliases

Name

Description

TransitionConstIterator

Alias for a bi‐directional const iterator over the sequence of transitions maintained by a Zoneinfo object.

allocator_type

Allocator type used by this class.

Member Functions

Name

Description

Zoneinfo [constructor]

Constructors

operator=

Assignment operators

addTransition

Add to this object a transition occurring at the specified utcTime when the local time in the described time‐zone adopts the characteristics of the specified descriptor. If a transition at utcTime is already present, replace it's local‐time descriptor with descriptor.

allocator

Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the currently installed default allocator is used.

beginTransitions

Return an iterator providing non‐modifiable access to the first transition in the ordered sequence of transitions maintained by this object. Note that if beginTransitions() == endTransitions() then there are no transitions stored by this object.

endTransitions

Return an iterator providing non‐modifiable access to the one‐past the last transition in the ordered sequence of transitions that is associated with this object. Note that if beginTransitions() == endTransitions() then there are no transitions stored by this object.

findTransitionForUtcTime

Return an iterator providing non‐modifiable access to the transition that holds the local‐time descriptor associated with the specified utcTime. The behavior is undefined unless numTransitions() > 0 and utcTime is at or after the transition returned by firstTransition.

firstTransition

Return a reference providing non‐modifiable access to the first transition contained in this object. The behavior is undefined unless numTransitions() > 0.

get_allocator

Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used.

identifier

Return a reference providing non‐modifiable access to the identifier attribute of this object.

numTransitions

Return the number of transitions maintained by this zone info.

posixExtendedRangeDescription

Return a reference providing non‐modifiable access to the posixExtendedRangeDescription attribute of this object, used to describe local time transitions far in the future (see {posixExtendedRangeDescription}).

print

Write the value of this object to the specified output stream in a human‐readable format, and return a reference to stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Note that the format is not fully specified, and can change without notice.

setIdentifier

setIdentifier overloads

setPosixExtendedRangeDescription

setPosixExtendedRangeDescription overloads

swap

Efficiently exchange the value of this object with the value of the specified other object. This method provides the no‐throw exception‐safety guarantee. The behavior is undefined unless this object was created with the same allocator as other.

operator BloombergLP::bslmf::NestedTraitDeclaration<Zoneinfo, UsesBslmaAllocator>

Nested trait declaration for bslma::UsesBslmaAllocator.

Friends

Name

Description

BloombergLP::baltzo::operator==

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two Zoneinfo objects have the same value if the corresponding value of their identifier attribute is the same and if both store the same sequence of transitions, ordered by time.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two Zoneinfo objects do not have the same value if their corresponding identifier attribute does not have the same value, or if both do not store the same sequence of transitions, ordered by time.

swap

Exchange the values of the specified a and b objects. This function provides the no‐throw exception‐safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise.

Created with MrDocs