[#BloombergLP-bdlt-TimeTz] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::TimeTz :relfileprefix: ../../ :mrdocs: This value‐semantic class describes a time value in a particular time zone, which is indicated using an offset from UTC (in minutes). == Synopsis Declared in `<bdlt_timetz.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class TimeTz; ---- == Description The offset is available via the `offset` method, and is defined by the relationship: `localTime() ‐ offset() == utcTime`. The time and offset values are logically assumed to correspond to geographically valid values, however, this constraint is not enforced. This class: * supports a complete set of _value‐semantic_ operations * supports BDEX streaming For terminology see `bsldoc_glossary`. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/TimeTz/2constructor-02.adoc[`TimeTz`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlt/TimeTz/2destructor.adoc[`~TimeTz`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bdlt/TimeTz/operator_assign.adoc[`operator=`] | Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. | xref:BloombergLP/bdlt/TimeTz/bdexStreamIn.adoc[`bdexStreamIn`] | Assign to this object the value read from the specified input stream. | xref:BloombergLP/bdlt/TimeTz/bdexStreamOut.adoc[`bdexStreamOut`] | Write this object to the specified output stream using BDEX. | xref:BloombergLP/bdlt/TimeTz/gmtTime.adoc[`gmtTime`] | Return a `Time` object having the value of the UTC time represented by this object. Note that the returned value is equal to `localTime() ‐ offset()` minutes. | xref:BloombergLP/bdlt/TimeTz/localTime.adoc[`localTime`] | Return the local time attribute of this object. | xref:BloombergLP/bdlt/TimeTz/offset.adoc[`offset`] | Return the time zone offset of this object in minutes from UTC. | xref:BloombergLP/bdlt/TimeTz/print.adoc[`print`] | Write this object to the specified stream in a human‐readable format. | xref:BloombergLP/bdlt/TimeTz/setTimeTz.adoc[`setTimeTz`] | Set this object's local time and time zone offset. | xref:BloombergLP/bdlt/TimeTz/setTimeTzIfValid.adoc[`setTimeTzIfValid`] | Set this object's time and offset if they form a valid `TimeTz`. | xref:BloombergLP/bdlt/TimeTz/utcTime.adoc[`utcTime`] | Return a `Time` object having the value of the UTC time represented by this object. Note that the returned value is equal to `localTime() ‐ offset()` minutes. | xref:BloombergLP/bdlt/TimeTz/validateAndSetTimeTz.adoc[`validateAndSetTimeTz`] | Set this object's time and offset if they form a valid `TimeTz`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/TimeTz/isValid.adoc[`isValid`] | Return whether `localTime` and `offset` form a valid `TimeTz`. | 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!=`] | Return whether the specified `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bdlt/operator_eq-0ac.adoc[`operator==`] | Return whether the specified `lhs` and `rhs` have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#