8#ifndef INCLUDED_BDLT_TIMETZ
9#define INCLUDED_BDLT_TIMETZ
154#include <bdlscm_version.h>
167#include <bsl_iosfwd.h>
196 enum ValidOffsetRange {
288 template <
class STREAM>
317 template <
class STREAM>
332 bsl::ostream&
print(bsl::ostream& stream,
334 int spacesPerLevel = 4)
const;
336#ifndef BDE_OPENSOURCE_PUBLICATION
395template <
class HASHALG>
410 return offset > k_MIN_OFFSET
420 if (versionSelector >= 20170401) {
436: d_localTime(localTime)
444: d_localTime(original.d_localTime)
445, d_offset(original.d_offset)
459 d_localTime = rhs.d_localTime;
460 d_offset = rhs.d_offset;
487template <
class STREAM>
532 Time utc(d_localTime);
548template <
class STREAM>
557 stream.putInt32(d_offset);
567#ifndef BDE_OPENSOURCE_PUBLICATION
594 return lhs.localTime() == rhs.localTime()
595 && lhs.offset() == rhs.offset();
601 return lhs.localTime() != rhs.localTime()
602 || lhs.offset() != rhs.offset();
608 return object.print(stream, 0, -1);
612template <
class HASHALG>
616 using ::BloombergLP::bslh::hashAppend;
Definition bdlt_timetz.h:190
Time localTime() const
Definition bdlt_timetz.h:518
void setTimeTz(const Time &localTime, int offset)
Definition bdlt_timetz.h:466
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition bdlt_timetz.h:549
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
TimeTz()
Create a TimeTz object having the (default) attribute values.
Definition bdlt_timetz.h:428
Time gmtTime() const
Definition bdlt_timetz.h:570
TimeTz & operator=(const TimeTz &rhs)
Definition bdlt_timetz.h:457
int validateAndSetTimeTz(const Time &localTime, int offset)
Definition bdlt_timetz.h:582
~TimeTz()
Destroy this object.
Definition bdlt_timetz.h:450
static bool isValid(const Time &localTime, int offset)
Definition bdlt_timetz.h:408
Time utcTime() const
Definition bdlt_timetz.h:530
static int maxSupportedBdexVersion()
Definition bdlt_timetz.h:576
int offset() const
Return the time zone offset of this object in minutes from UTC.
Definition bdlt_timetz.h:524
int setTimeTzIfValid(const Time &localTime, int offset)
Definition bdlt_timetz.h:475
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition bdlt_timetz.h:488
Definition bdlt_time.h:196
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition bdlt_time.h:858
int addMinutes(int minutes)
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition bdlt_time.h:938
#define BSLS_ANNOTATION_FALLTHROUGH
Definition bsls_annotation.h:412
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_REVIEW(X)
Definition bsls_review.h:949
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