A++ » INCLUDE » TDatime

class TDatime


TDatime

This class stores the date and time with a precision of one second
in an unsigned 32 bit word (e.g. 950130 124559). The date is stored
with the origin being the 1st january 1995.

This class has no support for time zones. The time is assumed
to be in the local time of the machine where the object was created.
As a result, TDatime objects are not portable between machines
operating in different time zones and unsuitable for storing the
date/time of data taking events and the like. If absolute time is
required, use TTimeStamp.


Function Members (Methods)

public:
virtual~TDatime()
const char*AsSQLString() const
const char*AsString() const
const char*AsString(char* out) const
static TClass*Class()
UInt_tConvert(Bool_t toGMT = kFALSE) const
voidCopy(TDatime& datime) const
voidFillBuffer(char*& buffer)
UInt_tGet() const
Int_tGetDate() const
static voidGetDateTime(UInt_t datetime, Int_t& date, Int_t& time)
Int_tGetDay() const
Int_tGetDayOfWeek() const
Int_tGetHour() const
Int_tGetMinute() const
Int_tGetMonth() const
Int_tGetSecond() const
Int_tGetTime() const
Int_tGetYear() const
virtual TClass*IsA() const
TDatime&operator=(const TDatime& d)
voidPrint(Option_t* option = "") const
voidReadBuffer(char*& buffer)
voidSet()
voidSet(const char* sqlDateTime)
voidSet(UInt_t tloc, Bool_t dosDate = kFALSE)
voidSet(Int_t date, Int_t time)
voidSet(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
virtual voidShowMembers(TMemberInspector& insp) const
Int_tSizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TDatime()
TDatime(const TDatime& d)
TDatime(const char* sqlDateTime)
TDatime(UInt_t tloc, Bool_t dosDate = kFALSE)
TDatime(Int_t date, Int_t time)
TDatime(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)

Data Members

protected:
UInt_tfDatimeDate (relative to 1995) + time

Class Charts

Inheritance Chart:
TDatime

Function documentation

TDatime& operator=(const TDatime& d)
{ fDatime = d.fDatime; return *this; }
TDatime()
TDatime(const TDatime& d)
{ }
TDatime(UInt_t tloc, Bool_t dosDate = kFALSE)
{ Set(tloc, dosDate); }
TDatime(Int_t date, Int_t time)
TDatime(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
virtual ~TDatime()
{ }
const char * AsString() const
const char * AsString(char* out) const
const char * AsSQLString() const
UInt_t Convert(Bool_t toGMT = kFALSE) const
void Copy(TDatime& datime) const
UInt_t Get() const
Int_t GetDate() const
Int_t GetTime() const
Int_t GetYear() const
{ return (fDatime>>26) + 1995; }
Int_t GetMonth() const
{ return (fDatime<<6)>>28; }
Int_t GetDay() const
{ return (fDatime<<10)>>27; }
Int_t GetDayOfWeek() const
Int_t GetHour() const
{ return (fDatime<<15)>>27; }
Int_t GetMinute() const
{ return (fDatime<<20)>>26; }
Int_t GetSecond() const
{ return (fDatime<<26)>>26; }
void FillBuffer(char*& buffer)
void Print(Option_t* option = "") const
void ReadBuffer(char*& buffer)
void Set()
void Set(UInt_t tloc, Bool_t dosDate = kFALSE)
void Set(Int_t date, Int_t time)
void Set(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
Int_t Sizeof() const
{return sizeof(UInt_t);}
void GetDateTime(UInt_t datetime, Int_t& date, Int_t& time)