Re: [ROOT] format of TDatime::GetDateTime().

From: gmoloche@mit.edu
Date: Thu May 30 2002 - 16:48:19 MEST


Haru:

try the code below. first, it transforms everything to C-like time values, and 
then gets date and time. this produces the output you were expecting. hope this 
helps.

TDatime t;
UInt_t ctime;
Int_t date, time;
t.Set(2002,05,29,0,0,0);
ctime = t.Convert();
t.Set(ctime+1); date=t.GetDate();time=t.GetTime(); 
cout << date << " " << time << endl; 
t.Set(ctime+50); date=t.GetDate();time=t.GetTime(); 
cout << date << " " << time << endl; 
t.Set(ctime+60); date=t.GetDate();time=t.GetTime(); 
cout << date << " " << time << endl; 
t.Set(ctime+70); date=t.GetDate();time=t.GetTime(); 
cout << date << " " << time << endl; 



Quoting Harufumi Tsuchiya <harufumi@icrr.u-tokyo.ac.jp>:

> 
> Hi ROOTers,
> 
> I found that strange behavior of GetDateTime of TDatime object.
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:54 MET