25 #ifndef LSST_DAF_BASE_DATETIME_H
26 #define LSST_DAF_BASE_DATETIME_H
50 namespace serialization {
64 DateTime(
int year,
int month,
int day,
int hr,
int min,
int sec,
66 explicit DateTime(std::string
const& iso8601);
72 struct tm
gmtime(void) const;
98 template <
class Archive>
void serialize(Archive ar,
int const version) {
static DateTime now(void)
double _getEpoch(Timescale scale) const
void setNsecsFromEpoch(double epoch, Timescale scale)
a function to convert epoch to internal nsecs
Class for handling dates/times, including MJD, UTC, and TAI.
double _getJd(Timescale scale) const
bool operator==(DateTime const &rhs) const
void setNsecsFromJd(double jd, Timescale scale)
a function to convert JD to internal nsecs
void serialize(Archive ar, int const version)
void setNsecsFromMjd(double mjd, Timescale scale)
a function to convert MJD to interal nsecs
static void initializeLeapSeconds(std::string const &leapString)
long long nsecs(Timescale scale=TAI) const
long long _nsecs
Nanoseconds since Unix epoch.
double _getMjd(Timescale scale) const
struct tm gmtime(void) const
struct timespec timespec(void) const
friend class boost::serialization::access
std::string toString(void) const
DateTime(long long nsecs=0LL, Timescale scale=TAI)
struct timeval timeval(void) const