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

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

== Synopsis

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

[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[`&#126;DatetimeTz`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/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/DatetimeTz/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input `stream`&period;
| xref:BloombergLP/bdlt/DatetimeTz/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this object to the specified output `stream`&period;
| xref:BloombergLP/bdlt/DatetimeTz/dateTz.adoc[`dateTz`] 
| Return a `DateTz` object having the value of the local date and offset represented by this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/gmtDatetime.adoc[`gmtDatetime`] 
| Return the UTC datetime represented by this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/localDatetime.adoc[`localDatetime`] 
| Return the local datetime represented by this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/offset.adoc[`offset`] 
| Return the time zone offset of this `DatetimeTz` object&period; Note that the offset is in minutes from UTC&period;
| xref:BloombergLP/bdlt/DatetimeTz/print.adoc[`print`] 
| Write this object to the specified output `stream` in a human&hyphen;readable format&period;
| xref:BloombergLP/bdlt/DatetimeTz/setDatetimeTz.adoc[`setDatetimeTz`] 
| Set the local datetime and time zone offset of this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/setDatetimeTzIfValid.adoc[`setDatetimeTzIfValid`] 
| Set this object from `localDatetime` and `offset` if they are valid&period;
| xref:BloombergLP/bdlt/DatetimeTz/timeTz.adoc[`timeTz`] 
| Return a `TimeTz` object having the value of the local time and offset represented by this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/utcDatetime.adoc[`utcDatetime`] 
| Return the UTC datetime represented by this object&period;
| xref:BloombergLP/bdlt/DatetimeTz/validateAndSetDatetimeTz.adoc[`validateAndSetDatetimeTz`] 
| Set this object from `localDatetime` and `offset` if they are valid&period;
|===


== 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`&period;
| 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!&equals;`]
| Return `true` if the two `DatetimeTz` objects do not have the same value&period;
| xref:BloombergLP/bdlt/operator_eq-00b.adoc[`operator&equals;&equals;`]
| Return `true` if the two `DatetimeTz` objects have the same value&period;
|===


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