[#BloombergLP-baltzo-TimeZoneUtilImp] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::TimeZoneUtilImp :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for utility functions that convert time values to, and from, local time. == Synopsis Declared in `<baltzo_timezoneutilimp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct TimeZoneUtilImp; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/baltzo/TimeZoneUtilImp/convertUtcToLocalTime.adoc[`convertUtcToLocalTime`] | Load, into the specified `result`, the local date‐time value, in the time zone indicated by the specified `resultTimeZoneId`, corresponding to the specified `utcTime`, using time zone information supplied by the specified `cache`. Return 0 on success, and a non‐zero value otherwise. A return status of `ErrorCode::k_UNSUPPORTED_ID` indicates that `resultTimeZoneId` is not recognized, and a return status of `ErrorCode::k_OUT_OF_RANGE` indicates that an out of range value of `result` would have occurred. | xref:BloombergLP/baltzo/TimeZoneUtilImp/createLocalTimePeriod.adoc[`createLocalTimePeriod`] | Load, into the specified `result`, attributes characterizing local time indicated by the specified `transition` in the specified `timeZone`. The behavior is undefined unless `ZoneinfoUtil::isWellFormed(timeZone)` is `true` and `transition` is a valid, non‐ending, iterator into the sequence of transitions described by `timeZone`. | xref:BloombergLP/baltzo/TimeZoneUtilImp/initLocalTime.adoc[`initLocalTime`] | Load, into the specified `result`, the local date‐time value ‐‐ including the local date, time, and resolved UTC offset ‐‐ indicated by the specified `localTime` in the time zone indicated by the specified `timeZoneId`, using the specified `dstPolicy` to interpret whether or not `localTime` represents a daylight‐saving time value, and using time zone information supplied by the specified `cache`. Load, into the specified `resultValidity` the value indicating the whether `localTime` is unique, ambiguous but valid, or invalid. Return 0 on success, and a non‐zero value otherwise. A return status of `ErrorCode::k_UNSUPPORTED_ID` indicates that `timeZoneId` is not recognized. The behavior is undefined unless the result of the initialization falls within the supported epoch. | xref:BloombergLP/baltzo/TimeZoneUtilImp/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` (e.g., the offset from UTC, whether it is daylight‐saving time), as well as the time interval over which those attributes apply, using time zone information supplied by the specified `cache`. Return 0 on success, and a non‐zero value otherwise. A return status of `ErrorCode::k_UNSUPPORTED_ID` indicates that `timeZoneId` is not recognized. | xref:BloombergLP/baltzo/TimeZoneUtilImp/resolveLocalTime.adoc[`resolveLocalTime`] | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#