25 #ifndef LSST_DAF_BASE_DATETIME_H
26 #define LSST_DAF_BASE_DATETIME_H
55 namespace serialization {
116 DateTime(
int year,
int month,
int day,
int hr,
int min,
int sec,
Timescale scale = TAI);
146 long long nsecs(
Timescale scale = TAI)
const;
188 struct timespec timespec(
Timescale scale) const;
198 struct timeval timeval(
Timescale scale) const;
205 bool operator==(
DateTime const& rhs)
const;
224 static
void initializeLeapSeconds(
std::
string const& leapString);
230 void _assertValid()
const {
243 double _getMjd(Timescale scale)
const;
252 double _getJd(Timescale scale)
const;
262 double _getEpoch(Timescale scale)
const;
271 void setNsecsFromMjd(
double mjd, Timescale scale);
280 void setNsecsFromJd(
double jd, Timescale scale);
289 void setNsecsFromEpoch(
double epoch, Timescale scale);
291 friend class boost::serialization::access;
299 template <
class Archive>
300 void serialize(Archive ar,
int const version) {
#define LSST_EXCEPT(type,...)
Class for handling dates/times, including MJD, UTC, and TAI.
bool isValid() const
Is this date valid?
constexpr static long long invalid_nsecs
size_t operator()(argument_type const &obj) const noexcept