[#BloombergLP-balber-BerUtil_TimeImpUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::BerUtil&lowbar;TimeImpUtil
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private `struct` provides a namespace for a suite of functions used by `BerUtil` to implement BER encoding and decoding operations for time values&period; Within the definition of this `struct`&colon;

== Synopsis

Declared in `&lt;balber&lowbar;berutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct BerUtil&lowbar;TimeImpUtil;
----

== Description

&ast; *the specification*&colon; &gt; Refers to the August 2015 revision of the ITU&hyphen;T Recommendation X&period;690&period;

&ast; *the default set of options*&colon; &gt; Refers to a `balber&colon;&colon;BerEncoderOptions` value having a &gt; `datetimeFractionalSecondPrecision` attribute of 3 and a &gt; `encodeDateAndTimeTypesAsBinary` attribute of `false`&period;

See the package level documentation of &lcub;`balber`&rcub; for a definition of the compact and extended binary formats for date and time values&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/DateAndTimeHeader.adoc[`DateAndTimeHeader`] 
| `Header` is an alias to an in&hyphen;core, value&hyphen;semantic attribute class that represents the range of valid values of the 2&hyphen;byte header of extended&hyphen;binary&hyphen;encoding formatted date&hyphen;and&hyphen;time values&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/DateAndTimeHeaderType.adoc[`DateAndTimeHeaderType`] 
| `Type` is an alias to a namespace for enumerating the set of &quot;header type&quot; values that may be encoded in the 2&hyphen;byte header of an extended&hyphen;binary&hyphen;encoding formatted date&hyphen;and&hyphen;time value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/DateAndTimeHeaderUtil.adoc[`DateAndTimeHeaderUtil`] 
| `DateAndTimeHeaderUtil` is an alias to a namespace for a suite of functions used to implement encoding and decoding operations for the 2&hyphen;byte header of an extended&hyphen;binary&hyphen;encoding formatted date&hyphen;and&hyphen;time value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/ExtendedBinaryEncodingUtil.adoc[`ExtendedBinaryEncodingUtil`] 
| `DateAndTimeHeaderUtil` is an alias to a namespace for a suite of functions used to implement encoding and decoding operations for the 2&hyphen;byte header of an extended&hyphen;binary&hyphen;encoding formatted date&hyphen;and&hyphen;time value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/IntegerUtil.adoc[`IntegerUtil`] 
| `IntegerUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for integer values&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/Iso8601Util.adoc[`Iso8601Util`] 
| `Iso8601Util` is an alias to a namespace for a suite of functions used to implementing the encoding and decoding of date and time values using the ISO 8601 format&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/LengthUtil.adoc[`LengthUtil`] 
| `LengthUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for length quantities&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/StreambufUtil.adoc[`StreambufUtil`] 
| `StreambufUtil` is an alias to a namespace for a suite of functions used to implement input and output operations on `bsl&colon;&colon;streambuf` objects&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/StringUtil.adoc[`StringUtil`] 
| `StringUtil` is an alias to a namespace for a suite of functions used by `BerUtil` to implement BER encoding and decoding operations for string values&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/TimeEncoding.adoc[`TimeEncoding`] 
| `TimeEncoding` is an alias to a namespace for enumerating the set of formats that may be used by `BerUtil` to encode and decode values of `bdlt&colon;&colon;Time` type&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/TimeOrTimeTz.adoc[`TimeOrTimeTz`] 
| `TimeOrTimeTz` is a convenient alias for `bdlb&colon;&colon;Variant2&lt;bdlt&colon;&colon;Time, bdlt&colon;&colon;TimeTz&gt;`&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/TimeOrTimeTzEncoding.adoc[`TimeOrTimeTzEncoding`] 
| `TimeOrTimeTzEncoding` is an alias to a namespace for enumerating the set of formats that may be used by `BerUtil` to decode to values of `bdlb&colon;&colon;Variant2&lt;bdlt&colon;&colon;Time, bdlt&colon;&colon;TimeTz&gt;` type&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/TimeTzEncoding.adoc[`TimeTzEncoding`] 
| `TimeTzEncoding` is an alias to a namespace for enumerating the set of formats that may be used by `BerUtil` to encode and decode values of `bdlt&colon;&colon;TimeTz` type&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/TimezoneUtil.adoc[`TimezoneUtil`] 
| `TimezoneUtil` is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for time&hyphen;zone offset values&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/getTimeOrTimeTzValue.adoc[`getTimeOrTimeTzValue`] 
| Read the specified `length` number of bytes from the input sequence of the specified `streamBuf` and load to the specified `value` the time and optional time zone value represented by those bytes&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable, and the bytes contain a valid representation of a time and optional time zone value&period; See the package&hyphen;level documentation of &lcub;`balber`&rcub; for a description of the decision procedure used to detect the encoding format for a `TimeOrTimeTz` value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/getTimeTzValue.adoc[`getTimeTzValue`] 
| Read the specified `length` number of bytes from the input sequence of the specified `streamBuf` and load to the specified `value` the time and time zone value represented by those bytes&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable, and the bytes contain a valid representation of a time and time zone value&period; See the package&hyphen;level documentation of &lcub;`balber`&rcub; for a description of the decision procedure used to detect the encoding format for a `bdlt&colon;&colon;TimeTz` value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/getTimeValue.adoc[`getTimeValue`] 
| Read the specified `length` number of bytes from the input sequence of the specified `streamBuf` and load to the specified `value` the time value represented those bytes&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable, and the bytes contain a valid representation of a time value&period; See the package&hyphen;level documentation of &lcub;`balber`&rcub; for a description of the decision procedure used to detect the encoding format for a `bdlt&colon;&colon;Time` value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/microsecondsSinceMidnightToTime.adoc[`microsecondsSinceMidnightToTime`] 
| Load to the specified `time` the time value represented by the specified `microsecondsSinceMidnight`&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/millisecondsSinceMidnightToTime.adoc[`millisecondsSinceMidnightToTime`] 
| Load to the specified `time` the time value represented by the specified `millisecondsSinceMidnight`&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/putTimeTzValue.adoc[`putTimeTzValue`] 
| Write a representation of the specified time and time&hyphen;zone `value` to the output sequence of the specified `streamBuf` according to the specified `options`&period; If `options` is 0, the default set of options is used&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; This operation succeeds if all bytes in the representation of the `value` are written to the output sequence of the `streamBuf` without the write position becoming unavailable&period; See the class documentation for a description of the default options&period; See the package&hyphen;level documentation of &lcub;`balber`&rcub; for a description of the decision procedure used to select an encoding format for the `value`&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/putTimeValue.adoc[`putTimeValue`] 
| Write a representation of the specified time `value` to the output sequence of the specified `streamBuf` according to the specified `options`&period; If `options` is 0, the default set of options is used&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; This operation succeeds if all bytes in the representation of the `value` are written to the output sequence of the `streamBuf` without the write position becoming unavailable&period; See the class documentation for a description of the default options&period; See the package&hyphen;level documentation of &lcub;`balber`&rcub; for a description of the decision procedure used to select an encoding format for the `value`&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/timeToMicrosecondsSinceMidnight.adoc[`timeToMicrosecondsSinceMidnight`] 
| Load to the specified `microsecondsSinceMidnight` the number of microseconds in the specified `time` value&period;
| xref:BloombergLP/balber/BerUtil_TimeImpUtil/timeToMillisecondsSinceMidnight.adoc[`timeToMillisecondsSinceMidnight`] 
| Load to the specified `millisecondsSinceMidnight` the number of milliseconds in the specified `time` value&period;
|===



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