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.
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) | |
virtual | ~TDatime() |
const char* | AsSQLString() const |
const char* | AsString() const |
const char* | AsString(char* out) const |
static TClass* | Class() |
UInt_t | Convert(Bool_t toGMT = kFALSE) const |
void | Copy(TDatime& datime) const |
void | FillBuffer(char*& buffer) |
UInt_t | Get() const |
Int_t | GetDate() const |
static void | GetDateTime(UInt_t datetime, Int_t& date, Int_t& time) |
Int_t | GetDay() const |
Int_t | GetDayOfWeek() const |
Int_t | GetHour() const |
Int_t | GetMinute() const |
Int_t | GetMonth() const |
Int_t | GetSecond() const |
Int_t | GetTime() const |
Int_t | GetYear() const |
virtual TClass* | IsA() const |
TDatime& | operator=(const TDatime& d) |
void | Print(Option_t* option = "") const |
void | ReadBuffer(char*& buffer) |
void | Set() |
void | Set(const char* sqlDateTime) |
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) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
Int_t | Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
UInt_t | fDatime | Date (relative to 1995) + time |
Expects as input a string in SQL date/time compatible format, like: yyyy-mm-dd hh:mm:ss.
Return the date & time as a string (ctime() format). Copy result because it points to a statically allocated string.
Return the date & time as a string (ctime() format). Result is copied into out (and out is returned). Make sure out can at least contain 26 characters. Thread safe.
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28. The returned string buffer is static and will be reused.
Convert fDatime from TDatime format to the standard time_t format. If toGMT is true, the time offset of the current local time zone is subtracted from the returned time_t. One use of such a non-standard time_t value is to convert a TDatime object that contains local time to GMT, as in this example: TDatime now; now.Set(now.Convert(kTRUE)); Caution: the time_t returned from Convert(kTRUE) is incompatible with regular Unix time - it contains an artificial, locale-dependent offset.
Set date and time. Data must be in format 980418 or 19980418 and time in 224512 (second precision). The date must be >= 950101. For years >= 2000, date can be given in the form 20001127 or 1001127 internally the date will be converted to 1001127
Set date and time. Year may be xx where 95 <= xx <= 199 (199 being 2099). The year must be >= 1995.
Expects as input a string in SQL date/time compatible format, like: yyyy-mm-dd hh:mm:ss.