12 namespace duds {
namespace time {
namespace planetary {
15 const boost::gregorian::date
EarthDateZero(boost::gregorian::date(1970,1,1));
31 earth = std::unique_ptr<Earth>(
new Earth());
32 earth->leaps.readZoneinfo(path);
39 return (std::time_t)((t - ls).time_since_epoch().count());
48 (t - ls).time_since_epoch().count() / 86400
58 (t + ls).time_since_epoch().count() / 86400
68 (t - ls).time_since_epoch().count()
78 (t + ls).time_since_epoch().count()
static const boost::gregorian::date & dateZero()
std::time_t timeUtc(const duds::time::interstellar::SecondTime &t) const
Converts from IST to UTC and provides a std::time_t result.
std::chrono::duration< std::int64_t > Seconds
Stores a duration in seconds.
duds::time::interstellar::Seconds leapSeconds(const duds::time::interstellar::SecondTime &when) const
Returns the sum of all leap seconds in use at the given time.
const boost::posix_time::ptime EarthTimeZero(EarthDateZero)
const boost::gregorian::date EarthDateZero(boost::gregorian::date(1970, 1, 1))
boost::gregorian::date date(const duds::time::interstellar::SecondTime &t) const
Converts from IST to UTC and provides a date result.
An extention to the C++ std::chrono::time_point template to make time points easier to work with...
boost::gregorian::date dateUtcToTai(const duds::time::interstellar::SecondTime &t) const
Converts from UTC to TAI and provides a date result.
std::chrono::duration< std::int64_t, std::milli > Milliseconds
Stores a duration in milliseconds.
unique_ptr< Earth > earth
static const boost::posix_time::ptime & timeZero()
static void make(const std::string &path="/usr/share/zoneinfo-leaps/UTC")
Makes the Earth planetary time object using the given zoneinfo file for data on leap seconds...
boost::posix_time::ptime posix(const duds::time::interstellar::MilliTime &t) const
Converts from IST to UTC and provides a ptime result.
boost::posix_time::ptime posixUtcToTai(const duds::time::interstellar::MilliTime &t) const
Converts from UTC to TAI and provides a ptime result.