[#BloombergLP-baltzo-TimeZoneUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::TimeZoneUtil
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for utility functions that convert time values to, from, and between, their corresponding local time representations in (possibly) different time zones&period;

== Synopsis

Declared in `&lt;baltzo&lowbar;timezoneutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct TimeZoneUtil;
----

== Description

These utility functions are&colon; &ast; _alias&hyphen;safe_ &ast; _exception&hyphen;neutral_ (agnostic) &ast; _thread&hyphen;safe_ For terminology see &lcub;`bsldoc&lowbar;glossary`&rcub;&period;

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baltzo/TimeZoneUtil/addInterval.adoc[`addInterval`] 
| Load, into the specified `result`, the local time value that is the specified `interval` in the future of the specified `originalTime` (in the time zone `originalTime&period;timeZoneId()`)&period; Return 0 on success, and a non&hyphen;zero value with no effect otherwise&period; A return value of `ErrorCode&colon;&colon;k&lowbar;UNSUPPORTED&lowbar;ID` indicates that `targetTimeZoneId` was not recognized, and a return value of `ErrorCode&colon;&colon;k&lowbar;OUT&lowbar;OF&lowbar;RANGE` indicates that the result of the operation would have been outside the range of values representable by the `result` type&period; The resulting local&hyphen;time is equivalent to adding `interval` to `originalTime&period;datetimeTz()&period;utcDatetime()` and converting the result into the local time of `originalTime&period;timeZoneId()`&period;
| xref:BloombergLP/baltzo/TimeZoneUtil/convertLocalToLocalTime-01.adoc[`convertLocalToLocalTime`] 
| `convertLocalToLocalTime` overloads
| xref:BloombergLP/baltzo/TimeZoneUtil/convertLocalToUtc-0f.adoc[`convertLocalToUtc`] 
| `convertLocalToUtc` overloads
| xref:BloombergLP/baltzo/TimeZoneUtil/convertUtcToLocalTime-0ec.adoc[`convertUtcToLocalTime`] 
| `convertUtcToLocalTime` overloads
| xref:BloombergLP/baltzo/TimeZoneUtil/initLocalTime-09e2.adoc[`initLocalTime`] 
| `initLocalTime` overloads
| xref:BloombergLP/baltzo/TimeZoneUtil/loadLocalTimePeriod-05.adoc[`loadLocalTimePeriod`] 
| `loadLocalTimePeriod` overloads
| xref:BloombergLP/baltzo/TimeZoneUtil/loadLocalTimePeriodForUtc.adoc[`loadLocalTimePeriodForUtc`] 
| Load, into the specified `result`, attributes characterizing local time at the specified `utcTime` in the time zone indicated by the specified `timeZoneId` (i&period;e&period;, the offset from UTC, whether daylight&hyphen;saving time is in effect and the description of the time zone), as well as the time interval over which those attributes apply&period; Return 0 on success, and a non&hyphen;zero value with no effect otherwise&period; A return value of `ErrorCode&colon;&colon;k&lowbar;UNSUPPORTED&lowbar;ID` indicates that `timeZoneId` was not recognized&period;
| xref:BloombergLP/baltzo/TimeZoneUtil/now-0f.adoc[`now`] 
| Load the current local time into `result`&period;
| xref:BloombergLP/baltzo/TimeZoneUtil/validateLocalTime-0b.adoc[`validateLocalTime`] 
| `validateLocalTime` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
