[#BloombergLP-bdlt-DatetimeTz] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::DatetimeTz :relfileprefix: ../../ :mrdocs: This value‐semantic class describes a datetime value in a particular time zone, which is indicated using an offset from UTC (in minutes). == Synopsis Declared in `<bdlt_datetimetz.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DatetimeTz; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/DatetimeTz/2constructor-086.adoc[`DatetimeTz`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlt/DatetimeTz/2destructor.adoc[`~DatetimeTz`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bdlt/DatetimeTz/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/DatetimeTz/bdexStreamIn.adoc[`bdexStreamIn`] | Assign to this object the value read from the specified input `stream`. | xref:BloombergLP/bdlt/DatetimeTz/bdexStreamOut.adoc[`bdexStreamOut`] | Write this object to the specified output `stream`. | xref:BloombergLP/bdlt/DatetimeTz/dateTz.adoc[`dateTz`] | Return a `DateTz` object having the value of the local date and offset represented by this object. | xref:BloombergLP/bdlt/DatetimeTz/gmtDatetime.adoc[`gmtDatetime`] | Return the UTC datetime represented by this object. | xref:BloombergLP/bdlt/DatetimeTz/localDatetime.adoc[`localDatetime`] | Return the local datetime represented by this object. | xref:BloombergLP/bdlt/DatetimeTz/offset.adoc[`offset`] | Return the time zone offset of this `DatetimeTz` object. Note that the offset is in minutes from UTC. | xref:BloombergLP/bdlt/DatetimeTz/print.adoc[`print`] | Write this object to the specified output `stream` in a human‐readable format. | xref:BloombergLP/bdlt/DatetimeTz/setDatetimeTz.adoc[`setDatetimeTz`] | Set the local datetime and time zone offset of this object. | xref:BloombergLP/bdlt/DatetimeTz/setDatetimeTzIfValid.adoc[`setDatetimeTzIfValid`] | Set this object from `localDatetime` and `offset` if they are valid. | xref:BloombergLP/bdlt/DatetimeTz/timeTz.adoc[`timeTz`] | Return a `TimeTz` object having the value of the local time and offset represented by this object. | xref:BloombergLP/bdlt/DatetimeTz/utcDatetime.adoc[`utcDatetime`] | Return the UTC datetime represented by this object. | xref:BloombergLP/bdlt/DatetimeTz/validateAndSetDatetimeTz.adoc[`validateAndSetDatetimeTz`] | Set this object from `localDatetime` and `offset` if they are valid. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/DatetimeTz/isValid.adoc[`isValid`] | Return `true` if `localDatetime` and `offset` form a valid `DatetimeTz`. | xref:BloombergLP/bdlt/DatetimeTz/maxSupportedBdexVersion-0a.adoc[`maxSupportedBdexVersion`] | `maxSupportedBdexVersion` overloads |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/operator_not_eq-082.adoc[`operator!=`] | Return `true` if the two `DatetimeTz` objects do not have the same value. | xref:BloombergLP/bdlt/operator_eq-00b.adoc[`operator==`] | Return `true` if the two `DatetimeTz` objects have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#