BloombergLP::bdlt::DatetimeTz

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>

class DatetimeTz;

Member Functions

NameDescription
DatetimeTz [constructor]Constructors
~DatetimeTz [destructor]Destroy this object.
operator= Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.
bdexStreamIn Assign to this object the value read from the specified input stream.
bdexStreamOut Write this object to the specified output stream.
dateTz Return a DateTz object having the value of the local date and offset represented by this object.
gmtDatetime Return the UTC datetime represented by this object.
localDatetime Return the local datetime represented by this object.
offset Return the time zone offset of this DatetimeTz object. Note that the offset is in minutes from UTC.
print Write this object to the specified output stream in a human-readable format.
setDatetimeTz Set the local datetime and time zone offset of this object.
setDatetimeTzIfValid Set this object from localDatetime and offset if they are valid.
timeTz Return a TimeTz object having the value of the local time and offset represented by this object.
utcDatetime Return the UTC datetime represented by this object.
validateAndSetDatetimeTz Set this object from localDatetime and offset if they are valid.

Static Member Functions

NameDescription
isValid Return true if localDatetime and offset form a valid DatetimeTz.
maxSupportedBdexVersion maxSupportedBdexVersion overloads

Non-Member Functions

NameDescription
operator!=Return true if the two DatetimeTz objects do not have the same value.
operator==Return true if the two DatetimeTz objects have the same value.