[#BloombergLP-bdlt-TimeTz]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::TimeTz
:relfileprefix: ../../
:mrdocs:

This value&hyphen;semantic class describes a time value in a particular time zone, which is indicated using an offset from UTC (in minutes)&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;timetz&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class TimeTz;
----

== Description

The offset is available via the `offset` method, and is defined by the relationship&colon; `localTime() &hyphen; offset() &equals;&equals; utcTime`&period; The time and offset values are logically assumed to correspond to geographically valid values, however, this constraint is not enforced&period;

This class&colon; &ast; supports a complete set of _value&hyphen;semantic_ operations &ast; supports BDEX streaming For terminology see `bsldoc&lowbar;glossary`&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/TimeTz/2constructor-02.adoc[`TimeTz`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlt/TimeTz/2destructor.adoc[`&#126;TimeTz`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlt/TimeTz/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object&period;
| xref:BloombergLP/bdlt/TimeTz/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input stream&period;
| xref:BloombergLP/bdlt/TimeTz/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this object to the specified output stream using BDEX&period;
| xref:BloombergLP/bdlt/TimeTz/gmtTime.adoc[`gmtTime`] 
| Return a `Time` object having the value of the UTC time represented by this object&period; Note that the returned value is equal to `localTime() &hyphen; offset()` minutes&period;
| xref:BloombergLP/bdlt/TimeTz/localTime.adoc[`localTime`] 
| Return the local time attribute of this object&period;
| xref:BloombergLP/bdlt/TimeTz/offset.adoc[`offset`] 
| Return the time zone offset of this object in minutes from UTC&period;
| xref:BloombergLP/bdlt/TimeTz/print.adoc[`print`] 
| Write this object to the specified stream in a human&hyphen;readable format&period;
| xref:BloombergLP/bdlt/TimeTz/setTimeTz.adoc[`setTimeTz`] 
| Set this object&apos;s local time and time zone offset&period;
| xref:BloombergLP/bdlt/TimeTz/setTimeTzIfValid.adoc[`setTimeTzIfValid`] 
| Set this object&apos;s time and offset if they form a valid `TimeTz`&period;
| xref:BloombergLP/bdlt/TimeTz/utcTime.adoc[`utcTime`] 
| Return a `Time` object having the value of the UTC time represented by this object&period; Note that the returned value is equal to `localTime() &hyphen; offset()` minutes&period;
| xref:BloombergLP/bdlt/TimeTz/validateAndSetTimeTz.adoc[`validateAndSetTimeTz`] 
| Set this object&apos;s time and offset if they form a valid `TimeTz`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/TimeTz/isValid.adoc[`isValid`] 
| Return whether `localTime` and `offset` form a valid `TimeTz`&period;
| xref:BloombergLP/bdlt/TimeTz/maxSupportedBdexVersion-043.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/operator_not_eq-0c6.adoc[`operator!&equals;`]
| Return whether the specified `lhs` and `rhs` do not have the same value&period;
| xref:BloombergLP/bdlt/operator_eq-0ac.adoc[`operator&equals;&equals;`]
| Return whether the specified `lhs` and `rhs` have the same value&period;
|===


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