25 #ifndef LSST_DAF_BASE_DATETIME_H 26 #define LSST_DAF_BASE_DATETIME_H 55 namespace serialization {
115 DateTime(
int year,
int month,
int day,
int hr,
int min,
int sec,
Timescale scale = TAI);
145 long long nsecs(
Timescale scale = TAI)
const;
187 struct timespec timespec(
Timescale scale) const;
197 struct timeval timeval(
Timescale scale) const;
202 bool isValid()
const {
return _nsecs != DateTime::invalid_nsecs; };
204 bool operator==(
DateTime const& rhs)
const;
223 static void initializeLeapSeconds(
std::string const& leapString);
229 void _assertValid()
const {
269 void setNsecsFromMjd(
double mjd,
Timescale scale);
278 void setNsecsFromJd(
double jd,
Timescale scale);
287 void setNsecsFromEpoch(
double epoch,
Timescale scale);
289 friend class boost::serialization::access;
297 template <
class Archive>
298 void serialize(Archive ar,
int const version) {
Class for handling dates/times, including MJD, UTC, and TAI.
size_t operator()(argument_type const &obj) const noexcept
#define LSST_EXCEPT(type,...)
bool isValid() const
Is this date valid?