8#ifndef INCLUDED_BDLT_DATETIMETZ
9#define INCLUDED_BDLT_DATETIMETZ
280#include <bdlscm_version.h>
295#include <bsl_iosfwd.h>
314 enum ValidOffsetRange {
412 template <
class STREAM>
451 template <
class STREAM>
466 bsl::ostream&
print(bsl::ostream& stream,
468 int spacesPerLevel = 4)
const;
470#ifndef BDE_OPENSOURCE_PUBLICATION
531template <
class HASHALG>
546 return k_MIN_OFFSET <
offset
556 if (versionSelector >= 20170401) {
572: d_localDatetime(localDatetime)
580: d_localDatetime(original.d_localDatetime)
581, d_offset(original.d_offset)
595 d_localDatetime = rhs.d_localDatetime;
596 d_offset = rhs.d_offset;
622template <
class STREAM>
656 return DateTz(d_localDatetime.
date(), d_offset);
662 return d_localDatetime;
674 return TimeTz(d_localDatetime.
time(), d_offset);
689template <
class STREAM>
698 stream.putInt32(d_offset);
708#ifndef BDE_OPENSOURCE_PUBLICATION
738 return lhs.localDatetime() == rhs.localDatetime()
739 && lhs.offset() == rhs.offset();
745 return !(lhs == rhs);
751 return rhs.print(stream, 0, -1);
755template <
class HASHALG>
759 using ::BloombergLP::bslh::hashAppend;
Definition bdlt_datetz.h:162
Definition bdlt_datetimetz.h:308
Datetime localDatetime() const
Definition bdlt_datetimetz.h:660
~DatetimeTz()
Destroy this object.
Definition bdlt_datetimetz.h:586
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition bdlt_datetimetz.h:690
void setDatetimeTz(const Datetime &localDatetime, int offset)
Definition bdlt_datetimetz.h:602
DateTz dateTz() const
Definition bdlt_datetimetz.h:654
DatetimeTz()
Definition bdlt_datetimetz.h:564
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition bdlt_datetimetz.h:623
Datetime gmtDatetime() const
Definition bdlt_datetimetz.h:712
TimeTz timeTz() const
Definition bdlt_datetimetz.h:672
int validateAndSetDatetimeTz(const Datetime &localDatetime, int offset)
Definition bdlt_datetimetz.h:724
static int maxSupportedBdexVersion()
Definition bdlt_datetimetz.h:718
static bool isValid(const Datetime &localDatetime, int offset)
Definition bdlt_datetimetz.h:544
DatetimeTz & operator=(const DatetimeTz &rhs)
Definition bdlt_datetimetz.h:593
int offset() const
Definition bdlt_datetimetz.h:666
Datetime utcDatetime() const
Definition bdlt_datetimetz.h:678
int setDatetimeTzIfValid(const Datetime &localDatetime, int offset)
Definition bdlt_datetimetz.h:611
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdlt_datetime.h:331
Date date() const
Return the value of the "date" part of this object.
Definition bdlt_datetime.h:2164
Datetime & addMinutes(bsls::Types::Int64 minutes)
Definition bdlt_datetime.h:1992
Time time() const
Return the value of the "time" part of this object.
Definition bdlt_datetime.h:2275
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition bdlt_datetime.h:2297
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition bdlt_datetime.h:2120
Definition bdlt_timetz.h:190
Definition bdlt_time.h:196
#define BSLS_ANNOTATION_FALLTHROUGH
Definition bsls_annotation.h:412
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
void hashAppend(HASH_ALGORITHM &hashAlg, const baljsn::EncoderTestAddress &object)
Definition baljsn_encoder_testtypes.h:9236
Definition bbldc_basicisma30360.h:112
bool operator==(const Calendar &lhs, const Calendar &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Calendar &calendar)
void hashAppend(HASHALG &hashAlg, const Calendar &object)
bool operator!=(const Calendar &lhs, const Calendar &rhs)
Definition bdlbb_blob.h:576