LTL
2.0.x
|
Representing UT as a wrapped time_t mother class. More...
Inherited by util::DCFDate, util::FitsDate, util::JulDate, util::LSTime, and util::UTTime.
Public Member Functions | |
UTDate () | |
Get actual UT (now). More... | |
UTDate (const time_t &init_date) | |
Assume init_date to hold UT. More... | |
UTDate (const timeval &init_date) | |
UTDate (const UTDate &init_date) | |
time_t | time () const |
get internal time_t More... | |
std::string | toString () const |
Return UTC date string. More... | |
Protected Member Functions | |
char * | toCString () const |
time_t | mkuttime (struct tm *ut_tm) |
time_t | mkdcftime (struct tm *dcf_tm) |
Protected Attributes | |
time_t & | ut_date_ |
suseconds_t & | ut_usec_ |
timeval | tv_date_ |
Representing UT as a wrapped time_t mother class.
All output is UTC, don't get confused! The Time is kept in util::UTDate::ut_date_" and always is UTC. All constructors are built to get UTC. Expanded with optional microsecond precision.
This class works for times between Jan. 1st 1970 (start of time_t epoch) and Dec. 31st 2037 due to overrun of 4 byte time_t epoch (in Jan. 2038).
util::UTDateException | are thrown on error. |
|
inline |
Get actual UT (now).
References tv_date_.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
time_t util::UTDate::time | ( | ) | const |
get internal time_t
std::string util::UTDate::toString | ( | ) | const |
Return UTC date string.
|
protected |
Referenced by UTDate().
|
protected |
Referenced by UTDate().
|
protected |
Referenced by util::JulDate::JulDate(), util::MJDate::MJDate(), and UTDate().