LTL  2.0.x
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
util::UTDate Class Reference

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...
 
time_t time () const
 get internal time_t More...
 
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_
 

Detailed Description

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.

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).

Exceptions
util::UTDateExceptionare thrown on error.

Constructor & Destructor Documentation

util::UTDate::UTDate ( )
inline

Get actual UT (now).

util::UTDate::UTDate ( const time_t &  init_date)
inline

Assume init_date to hold UT.

Member Function Documentation

char* util::UTDate::toCString ( ) const
protected
time_t util::UTDate::mkuttime ( struct tm *  ut_tm)
protected
time_t util::UTDate::mkdcftime ( struct tm *  dcf_tm)
protected
time_t util::UTDate::time ( ) const

get internal time_t

string util::UTDate::toString ( ) const

Return UTC date string.

Member Data Documentation

time_t util::UTDate::ut_date_
protected

Referenced by util::JulDate::JulDate().