BDE 4.14.0 Production release
Loading...
Searching...
No Matches
baltzo_zoneinfoutil.h
Go to the documentation of this file.
1/// @file baltzo_zoneinfoutil.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// baltzo_zoneinfoutil.h -*-C++-*-
8#ifndef INCLUDED_BALTZO_ZONEINFOUTIL
9#define INCLUDED_BALTZO_ZONEINFOUTIL
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup baltzo_zoneinfoutil baltzo_zoneinfoutil
15/// @brief Provide utility operations on `baltzo::Zoneinfo` objects.
16/// @addtogroup bal
17/// @{
18/// @addtogroup baltzo
19/// @{
20/// @addtogroup baltzo_zoneinfoutil
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#baltzo_zoneinfoutil-purpose"> Purpose</a>
25/// * <a href="#baltzo_zoneinfoutil-classes"> Classes </a>
26/// * <a href="#baltzo_zoneinfoutil-description"> Description </a>
27/// * <a href="#baltzo_zoneinfoutil-determining-relevant-transitions-with-loadrelevanttransitions"> Determining Relevant Transitions with loadRelevantTransitions </a>
28/// * <a href="#baltzo_zoneinfoutil-well-formed-time-zone-information"> Well-Formed Time Zone Information </a>
29/// * <a href="#baltzo_zoneinfoutil-overlapping-transitions"> Overlapping Transitions </a>
30/// * <a href="#baltzo_zoneinfoutil-usage"> Usage </a>
31/// * <a href="#baltzo_zoneinfoutil-prologue-initializing-a-baltzo-zoneinfo-object"> Prologue: Initializing a baltzo::Zoneinfo Object </a>
32/// * <a href="#baltzo_zoneinfoutil-example-1-converting-from-a-utc-time-to-a-local-time"> Example 1: Converting from a UTC Time to a Local Time </a>
33/// * <a href="#baltzo_zoneinfoutil-example-2-determining-the-type-of-a-local-time"> Example 2: Determining the Type of a Local Time </a>
34///
35/// # Purpose {#baltzo_zoneinfoutil-purpose}
36/// Provide utility operations on `baltzo::Zoneinfo` objects.
37///
38/// # Classes {#baltzo_zoneinfoutil-classes}
39///
40/// - baltzo::ZoneinfoUtil: utility for operations on a `baltzo::Zoneinfo` object
41///
42/// @see baltzo_zoneinfo, baltzo_localtimevalidity
43///
44/// # Description {#baltzo_zoneinfoutil-description}
45/// This component provides a suite of pure functions that operate
46/// on objects of type `baltzo::Zoneinfo`. A `baltzo::Zoneinfo` is a value
47/// semantic-type providing information about a time zone, mirroring the
48/// information found in the Zoneinfo Database, a public-domain distribution of
49/// time zone data (see @ref baltzo_zoneinfo for more information). The primary
50/// functions provided by `baltzo::ZoneinfoUtil` are `convertUtcToLocalTime` and
51/// `loadRelevantTransitions`: `convertUtcToLocalTime` converts a UTC time into
52/// its corresponding local time in the time zone described by the supplied
53/// `baltzo::Zoneinfo` object; `loadRelevantTransitions` returns the transition,
54/// from the supplied `baltzo::Zoneinfo` object's list of transitions that
55/// describes the attributes of local time in effect at supplied local time;
56/// returning two possible transitions in instances where the supplied local
57/// time is either invalid or ambiguous (see @ref baltzo_localtimevalidity ). Note
58/// that the time supplied as input to `convertUtcToLocalTime` is a *UTC* time,
59/// whereas the time supplied as input to `loadRelevantTransitions` is a *local*
60/// time.
61///
62/// ## Determining Relevant Transitions with loadRelevantTransitions {#baltzo_zoneinfoutil-determining-relevant-transitions-with-loadrelevanttransitions}
63///
64///
65/// The function `loadRelevantTransitions` is used to find the transition in a
66/// `baltzo::Zoneinfo` object that describes the properties of a client supplied
67/// local time value. In instances where the client supplied local time is
68/// either ambiguous or invalid `loadRelevantTransitions` returns an alternative
69/// transition that refers to a second set of properties that could be used to
70/// describe the supplied local time. To understand why multiple transitions
71/// might be needed, consider the impact of daylight-saving time transitions on
72/// local time in New York:
73/// @code
74/// Figure 1: Mapping between UTC Time and New York Local Time
75///
76/// EST - Eastern Standard Time (UTC-5:00)
77/// EDT - Eastern Daylight Time (UTC-4:00)
78///
79/// ,-invalid times ,- ambiguous times
80/// T2 / T3 T4 / T5
81/// @-----O @------O
82///
83/// T1 EST T2 T4 EST
84/// New York Time @--------------------O @------------------>
85/// | T3 EDT | T5
86/// | @------------|------O
87/// / __/ / __/
88/// / __/ / __/
89/// /__/ /__/
90/// UTC Time +---------------+-------------------+---------------------->
91/// | | |
92/// Transition 1 Transition 2 Transition 3
93/// (to EST) (to EDT) (to EST)
94///
95/// @endcode
96/// In New York, clocks are set forward an hour in the spring, creating the
97/// discontinuity between T2 and T3 in the diagram. A New York local time value
98/// in the range [T2, T3) is considered invalid, because a correctly set clock
99/// in New York would never display that value. Similarly, clocks are set back
100/// an hour in the fall, creating the discontinuity between T4 and T5 in the
101/// diagram. A New York local time value in the range [T4, T5) is considered
102/// ambiguous, as local times in that range occur twice. For either invalid or
103/// ambiguous times, `loadRelevantTransitions` will return two distinct
104/// iterators referring to the adjacent transitions holding the two descriptions
105/// that might be applied to that local time.
106///
107/// For example, consider the returned validity and transitions for the
108/// following New York local times:
109/// @code
110/// New York Local Time Validity 1st Transition 2nd Transition
111/// ------------------- ----------- ------------------ ------------------
112/// Jan 1, 2010 2:30am *_UNIQUE Nov 1, 2009 (EST) Nov 1, 2009 (EST)
113/// Mar 14, 2010 2:30am *_INVALID Nov 1, 2009 (EST) Mar 14, 2010 (EDT)
114/// Nov 7, 2010 1:30am *_AMBIGUOUS Mar 14, 2010 (EDT) Nov 7, 2010 (EST)
115/// @endcode
116///
117/// ## Well-Formed Time Zone Information {#baltzo_zoneinfoutil-well-formed-time-zone-information}
118///
119///
120/// The primary operations provided by this component require the supplied
121/// Zoneinfo value meet certain constraints that are not enforced by the
122/// `baltzo::Zoneinfo` type itself. A Zoneinfo meeting these constraints is
123/// considered *well-formed*, and `baltzo::ZoneinfoUtil::isWellFormed` will
124/// return `true` for such a value. Specifically, a `baltzo::Zoneinfo` object
125/// is considered well-formed only if *all* of the following are true:
126///
127/// 1. The Zoneinfo provides at least one transition.
128/// 2. The first transition in the Zoneinfo is at the first representable
129/// `bdlt::Datetime` value, "Jan 01, 0001 00:00" -- i.e.,
130/// `bdlt::Datetime(1, 1, 1)`.
131/// 3. There is no transition in the ordered sequence of transitions described
132/// by the Zoneinfo where local clock time is adjusted (either forwards or
133/// backwards) introducing a period of invalid or ambiguous local times,
134/// where that range of invalid or ambiguous local times overlaps with the
135/// range of invalid or ambiguous local times introduced by subsequent
136/// transition.
137///
138/// Note that `baltzo::ZoneinfoUtil::isWellFormed` has linear complexity with
139/// respect to the number of transitions that the Zoneinfo value defines.
140///
141/// ### Overlapping Transitions {#baltzo_zoneinfoutil-overlapping-transitions}
142///
143///
144/// In order to better understand the 3rd constraint (above) on a well-formed
145/// Zoneinfo object, first, notice that Figure 1 above (showing local time in
146/// New York) illustrates a well-formed sequence of transitions. Both
147/// Transition 2 (to EDT) and Transition 3 (to EST) introduce a range of
148/// ambiguous or invalid times (ambiguous when clocks are adjusted backwards,
149/// invalid when clocks are adjusted forward), but those two ranges of ambiguous
150/// and invalid local times do not overlap.
151///
152/// However, a Zoneinfo object is not well-formed if two transitions occur so
153/// close together that the respective ranges of invalid or ambiguous times that
154/// those transitions introduce, overlap with one and other, as illustrated in
155/// Figure 2.
156/// @code
157/// Figure 2: Overlapping Transitions
158///
159/// Standard Time (STD): UTC+00:00
160/// Daylight-Saving Time (DST): UTC+01:00
161///
162/// Transition 1 (to DST): At 00:00 UTC (00:00 local)
163/// Transition 2 (to STD): At 00:30 UTC (01:30 local)
164///
165///
166/// (00:30) STD
167/// STD (00:00) @--------------------------
168/// Local Time @------------O | DST
169/// | | (01:00) @------O (01:30)
170/// | | __/ _/
171/// \ \ __/ __/
172/// \ __\/ __/
173/// \ ___/ \ __/
174/// UTC Time +---------------+---------+----------------------------
175/// Transition 1 Transition 2
176/// (01:00 UTC) (01:30 UTC)
177/// @endcode
178/// Notice that between [ 00:30 .. 01:00 ] local time, the range of invalid
179/// times introduced by Transition 1, overlaps with the range of ambiguous times
180/// introduced by Transition 2. The above time zone would therefore *not* be
181/// well-formed.
182///
183/// ## Usage {#baltzo_zoneinfoutil-usage}
184///
185///
186/// The following examples demonstrate how to use a `ZoneinfoUtil` to perform
187/// common operations on time values using a Zoneinfo description of a time
188/// zone.
189///
190/// ### Prologue: Initializing a baltzo::Zoneinfo Object {#baltzo_zoneinfoutil-prologue-initializing-a-baltzo-zoneinfo-object}
191///
192///
193/// We start by creating a Zoneinfo time zone description for New York, which we
194/// will use in subsequent examples. Note that, in practice, clients should
195/// obtain time zone information from a data source (see
196/// @ref baltzo_zoneinfocache ).
197///
198/// First we create a Zoneinfo object for New York, and populate `newYork` with
199/// the correct time zone identifier:
200/// @code
201/// baltzo::Zoneinfo newYork;
202/// newYork.setIdentifier("America/New_York");
203/// @endcode
204/// Next we create two local-time descriptors, one for standard time and one for
205/// daylight-saving time:
206/// @code
207/// baltzo::LocalTimeDescriptor est(-18000, false, "EST");
208/// baltzo::LocalTimeDescriptor edt(-14400, true, "EDT");
209/// @endcode
210/// Then we set the initial descriptor for `newYork` to Eastern Standard Time.
211/// Note that such an initial transition is required for a `baltzo::Zoneinfo`
212/// object to be considered Well-Formed (see `isWellFormed`):
213/// @code
214/// newYork.addTransition(bdlt::EpochUtil::convertToTimeT64(
215/// bdlt::Datetime(1, 1, 1)),
216/// est);
217/// @endcode
218/// Next we create a series of transitions between these local-time descriptors
219/// for the years 2007-2011. Note that the United States transitions to
220/// daylight saving time on the second Sunday in March, at 2am local time (07:00
221/// UTC), and transitions back to standard time on the first Sunday in November
222/// at 2am local time (06:00 UTC), resulting in an even number of transitions:
223/// @code
224/// static const bdlt::Datetime TRANSITION_TIMES[] = {
225/// bdlt::Datetime(2007, 3, 11, 7),
226/// bdlt::Datetime(2007, 11, 4, 6),
227/// bdlt::Datetime(2008, 3, 9, 7),
228/// bdlt::Datetime(2008, 11, 2, 6),
229/// bdlt::Datetime(2009, 3, 8, 7),
230/// bdlt::Datetime(2009, 11, 1, 6),
231/// bdlt::Datetime(2010, 3, 14, 7),
232/// bdlt::Datetime(2010, 11, 7, 6),
233/// bdlt::Datetime(2011, 3, 13, 7),
234/// bdlt::Datetime(2011, 11, 6, 6),
235/// };
236/// const int NUM_TRANSITION_TIMES =
237/// sizeof TRANSITION_TIMES / sizeof *TRANSITION_TIMES;
238/// assert(0 == NUM_TRANSITION_TIMES % 2);
239///
240/// for (int i = 0; i < NUM_TRANSITION_TIMES; i += 2) {
241/// newYork.addTransition(bdlt::EpochUtil::convertToTimeT64(
242/// TRANSITION_TIMES[i]),
243/// edt);
244/// newYork.addTransition(bdlt::EpochUtil::convertToTimeT64(
245/// TRANSITION_TIMES[i + 1]),
246/// est);
247/// }
248/// @endcode
249/// Finally we verify that the time zone information we've created is considered
250/// well-formed (as discussed above):
251/// @code
252/// assert(true == baltzo::ZoneinfoUtil::isWellFormed(newYork));
253/// @endcode
254///
255/// ### Example 1: Converting from a UTC Time to a Local Time {#baltzo_zoneinfoutil-example-1-converting-from-a-utc-time-to-a-local-time}
256///
257///
258/// In this example we demonstrate how to convert a UTC time to the
259/// corresponding local time using the `convertUtcToLocalTime` class method.
260///
261/// We start by creating a `bdlt::Datetime` representing the UTC time "Dec 12,
262/// 2010 15:00":
263/// @code
264/// bdlt::Datetime utcTime(2010, 12, 12, 15, 0, 0);
265/// @endcode
266/// Now, we call `convertUtcToLocalTime` and supply as input both `utcTime` and
267/// the Zoneinfo description for `newYork` (which we initialized in the prologue
268/// above):
269/// @code
270/// bdlt::DatetimeTz localNYTime;
271/// baltzo::Zoneinfo::TransitionConstIterator iterator;
272/// baltzo::ZoneinfoUtil::convertUtcToLocalTime(&localNYTime,
273/// &iterator,
274/// utcTime,
275/// newYork);
276/// @endcode
277/// Then we verify that `localNYTime` is "Dec 12, 2010 10:00+5:00", the time in
278/// New York corresponding to the UTC time "Dec 12, 2010 15:00".
279/// @code
280/// assert(utcTime == localNYTime.utcDatetime());
281/// assert(bdlt::Datetime(2010, 12, 12, 10) == localNYTime.localDatetime());
282/// assert(-5 * 60 == localNYTime.offset());
283/// @endcode
284/// Finally, we verify that the returned `iterator` refers to the local-time
285/// transition immediately before `utcTime`, and that that transition refers to
286/// a local-time descriptor characterizing standard-time in New York:
287/// @code
288/// baltzo::Zoneinfo::TransitionConstIterator transitionIter = iterator;
289/// baltzo::Zoneinfo::TransitionConstIterator nextTransitionIter = ++iterator;
290///
291/// const bdlt::EpochUtil::TimeT64 utcTimeT =
292/// bdlt::EpochUtil::converToTimeT64(utcTime);
293/// assert(utcTimeT >= transitionIter->transition());
294/// assert(utcTimeT < nextTransitionIter->transition());
295///
296/// assert(false == transitionIter->descriptor().dstInEffectFlag());
297/// assert(-5 * 60 * 60 == transitionIter->descriptor().utcOffsetInSeconds());
298/// assert("EST" == transitionIter->descriptor().description());
299/// @endcode
300///
301/// ### Example 2: Determining the Type of a Local Time {#baltzo_zoneinfoutil-example-2-determining-the-type-of-a-local-time}
302///
303///
304/// In this next example we use `loadRelevantTransitions` to determine the
305/// local-time descriptor (see @ref baltzo_localtimedescriptor ) that applies to a
306/// local time value, represented using a `bdlt::Datetime` object.
307///
308/// We start by defining a `bdlt::Datetime` object for "Jan 1, 2011 12:00" in
309/// New York:
310/// @code
311/// bdlt::Datetime nyLocalTime(2011, 1, 1, 12);
312/// @endcode
313/// Then, we call `loadRelevantTransitions`, and supply, as input, both
314/// `nyLocalTime` and the Zoneinfo description for `newYork` (which we
315/// initialized in the prologue above):
316/// @code
317/// baltzo::LocalTimeValidity::Enum validity;
318/// baltzo::Zoneinfo::TransitionConstIterator firstTransition;
319/// baltzo::Zoneinfo::TransitionConstIterator secondTransition;
320/// baltzo::ZoneinfoUtil::loadRelevantTransitions(&firstTransition,
321/// &secondTransition,
322/// &validity,
323/// nyLocalTime,
324/// newYork);
325/// @endcode
326/// "Jan 1, 2011 12:00" in New York, is not near a daylight-saving time
327/// transition, so it uniquely describes a valid time (in New York) which falls
328/// during Eastern Standard Time, and whose local time offset from UTC is -5:00.
329/// Because "Jan 1, 2011 12:00" is both a valid and unique local time, the
330/// returned validity will be `baltzo::LocalTimeValidity::e_VALID_UNIQUE` and
331/// the two returned transition iterators will be equal:
332/// @code
333/// assert(baltzo::LocalTimeValidity::e_VALID_UNIQUE == validity);
334/// assert(firstTransition == secondTransition);
335///
336/// assert(false == firstTransition->descriptor().dstInEffectFlag());
337/// assert(-5*60*60 == firstTransition->descriptor().utcOffsetInSeconds());
338/// assert("EST" == firstTransition->descriptor().description());
339/// @endcode
340/// Next, we create a second `bdlt::Datetime` object to represent "Nov 7, 2010
341/// 1:30" in New York. Note that the clock time "Nov 7, 2010 1:30" occurred
342/// twice in New York, as clocks were set back by an hour an instant before the
343/// local clock would have reached "Nov 7, 2010 02:00 EDT", and it is therefore
344/// ambiguous which of those two values that local time is meant to refer.
345/// @code
346/// bdlt::Datetime ambiguousLocalTime(2010, 11, 7, 1, 30);
347/// @endcode
348/// Now, we call `loadRelevantTransitions`, this time supplying
349/// `ambiguousLocalTime`:
350/// @code
351/// baltzo::ZoneinfoUtil::loadRelevantTransitions(&firstTransition,
352/// &secondTransition,
353/// &validity,
354/// ambiguousLocalTime,
355/// newYork);
356/// @endcode
357/// Finally we observe that the local time was ambiguous and that the returned
358/// transitions are distinct:
359/// @code
360/// assert(baltzo::LocalTimeValidity::e_VALID_AMBIGUOUS == validity);
361/// assert(firstTransition != secondTransition);
362/// @endcode
363/// Because `ambiguousLocalTime` may refer to either the standard or the
364/// daylight-saving time value "Nov 7, 2010 01:30", the returned validity will
365/// be `e_VALID_AMBIGUOUS`, and the `first` and `second` iterators will differ.
366/// `first` will refer to a description of the local time before the transition
367/// (daylight-saving time) and `second` will refer to a description of local
368/// time after the transition (standard-time):
369/// @code
370/// assert(true == firstTransition->descriptor().dstInEffectFlag());
371/// assert(-4*60*60 == firstTransition->descriptor().utcOffsetInSeconds());
372/// assert("EDT" == firstTransition->descriptor().description());
373///
374/// assert(false == secondTransition->descriptor().dstInEffectFlag());
375/// assert(-5*60*60 == secondTransition->descriptor().utcOffsetInSeconds());
376/// assert("EST" == secondTransition->descriptor().description());
377/// @endcode
378/// Note that the two transitions returned are adjacent:
379/// @code
380/// ++firstTransition;
381/// assert(firstTransition == secondTransition);
382/// @endcode
383/// @}
384/** @} */
385/** @} */
386
387/** @addtogroup bal
388 * @{
389 */
390/** @addtogroup baltzo
391 * @{
392 */
393/** @addtogroup baltzo_zoneinfoutil
394 * @{
395 */
396
397#include <balscm_version.h>
398
400#include <baltzo_zoneinfo.h>
401
402#include <bdlt_datetime.h>
403#include <bdlt_datetimetz.h>
404
405#include <bsl_iosfwd.h>
406
407
408namespace baltzo {
409 // ==================
410 // class ZoneinfoUtil
411 // ==================
412
413/// This `struct` provides a namespace for utility operations using a
414/// `Zoneinfo` object.
416
417 // CLASS METHODS
418
419 /// Load, into the specified `resultTime`, the local date-time value, in
420 /// the specified `timeZone`, corresponding to the specified `utcTime`,
421 /// and load, into the specified `resultTransition`, an iterator
422 /// referring to the first transition in `timeZone` whose
423 /// transition-time is before `utcTime`. Return 0 on success, and
424 /// `baltzo::ErrorCode::k_OUT_OF_RANGE` if `resultTime` would be outside
425 /// of the legal range that a `bdlt::DatetimeTz` can represent. The
426 /// behavior is undefined unless `isWellFormed(timeZone)` is `true`.
428 bdlt::DatetimeTz *resultTime,
429 Zoneinfo::TransitionConstIterator *resultTransition,
430 const bdlt::Datetime& utcTime,
431 const Zoneinfo& timeZone);
432
433 /// Load, into the specified `firstResultTransition`, an iterator
434 /// referring to the transition describing the characteristics of local
435 /// time in effect at the specified `localTime` in the specified
436 /// `timeZone`; in instances where `localTime` is not both a unique and
437 /// valid local time in `timeZone`, load, into the specified
438 /// `secondResultTransition`, an iterator referring to a subsequent
439 /// transition describing the alternative characteristics of local time
440 /// that could also apply to `localTime`; finally load, into the
441 /// specified `resultValidity`, the validity of `localTime` as being
442 /// unique, ambiguous but valid, or invalid. If `resultValidity` is
443 /// `e_VALID_UNIQUE`, then `firstResultTransition` and
444 /// `secondResultTransition` will be loaded with the same transition,
445 /// otherwise the returned transitions will be distinct with
446 /// `secondResultTransition` referring to the transition immediately
447 /// after `firstResultTransition`. The behavior is undefined unless
448 /// `isWellFormed(timeZone)` is `true`, and
449 /// `firstResultTransition != secondResultTransition`.
451 Zoneinfo::TransitionConstIterator *firstResultTransition,
452 Zoneinfo::TransitionConstIterator *secondResultTransition,
453 LocalTimeValidity::Enum *resultValidity,
454 const bdlt::Datetime& localTime,
455 const Zoneinfo& timeZone);
456
457 /// Return `true` if the specified `timeZone` is a well-formed Zoneinfo
458 /// object (which can be used by other methods on this utility), and
459 /// `false` otherwise. For a Zoneinfo to be considered well-formed
460 /// *all* of the following must be true:
461 ///
462 /// 1. `timeZone.numTransitions() > 0`
463 /// 2. The first transition in `timeZone` is at the first representable
464 /// `bdlt::Datetime` value, "Jan 01, 0001 00 00.000" -- i.e.,
465 /// `bdlt::Datetime(1, 1, 1)`.
466 /// 3. There is no transition in the ordered sequence of transitions
467 /// described by `timeZone` where the local clock time is adjusted
468 /// (either forwards or backwards) introducing a period of invalid or
469 /// ambiguous local times, where that range of invalid or ambiguous
470 /// local times overlaps with a range of invalid or or ambiguous
471 /// local times introduced by the subsequent transition (see
472 /// component documentation for an illustration).
473 ///
474 /// Note that this method has linear worst-case time complexity with
475 /// respect to `timeZone.numTransitions()`.
476 static bool isWellFormed(const Zoneinfo& timeZone);
477};
478
479} // close package namespace
480
481
482#endif
483
484// ----------------------------------------------------------------------------
485// Copyright 2015 Bloomberg Finance L.P.
486//
487// Licensed under the Apache License, Version 2.0 (the "License");
488// you may not use this file except in compliance with the License.
489// You may obtain a copy of the License at
490//
491// http://www.apache.org/licenses/LICENSE-2.0
492//
493// Unless required by applicable law or agreed to in writing, software
494// distributed under the License is distributed on an "AS IS" BASIS,
495// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
496// See the License for the specific language governing permissions and
497// limitations under the License.
498// ----------------------------- END-OF-FILE ----------------------------------
499
500/** @} */
501/** @} */
502/** @} */
Definition baltzo_zoneinfo.h:429
TransitionSequence::const_iterator TransitionConstIterator
Definition baltzo_zoneinfo.h:488
Definition bdlt_datetimetz.h:308
Definition bdlt_datetime.h:331
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition baltzo_datafileloader.h:263
Enum
Definition baltzo_localtimevalidity.h:149
Definition baltzo_zoneinfoutil.h:415
static int convertUtcToLocalTime(bdlt::DatetimeTz *resultTime, Zoneinfo::TransitionConstIterator *resultTransition, const bdlt::Datetime &utcTime, const Zoneinfo &timeZone)
static bool isWellFormed(const Zoneinfo &timeZone)
static void loadRelevantTransitions(Zoneinfo::TransitionConstIterator *firstResultTransition, Zoneinfo::TransitionConstIterator *secondResultTransition, LocalTimeValidity::Enum *resultValidity, const bdlt::Datetime &localTime, const Zoneinfo &timeZone)