Re: [ROOT] gStyle->SetTimeOffset

From: Dariusz Miskowiec (D.Miskowiec@gsi.de)
Date: Thu Sep 04 2003 - 09:27:59 MEST


Dear Olivier,

I do not think that only offset=0 generated problems. All
offset values below 7.88918400000000000e+08 (i.e. before
1995-01-01 01:00:00) generated problems. As I said, in my
opinion the special date of January 1st, 1995, should be
removed from root. I can only guess that it was introduced
some years ago to make some numbers smaller, but in the
meantime we are in 2003 and the number of seconds from 1995
is only 4 times smaller than the number of seconds from
1970, so I see no reason not to use the standard unix epoch.

To be more specific, I think TDatime should be changed such
to store internally number of seconds from 1970 rather than
from 1995, and then the problem would be fixed at the origin.

Best regards
Dariusz Miskowiec

Olivier Couet wrote:
> Hi Dariusz,
> 
>  Only "time offset = 0" generated problems. Time offsets non equal to zero 
> are treated as before.
> 
>  Cheers,        Olivier
> 
> On Wed, 3 Sep 2003, Dariusz Miskowiec wrote:
> 
> 
>>Hi Olivier,
>>
>>Yes, this is what I expect. I hope it works not only for
>>the time offset exactly equal to 0, but also 57, for example.
>>Am I right?
>>
>>Thanks and best regards
>>Dariusz Miskowiec
>>
>>Olivier Couet wrote:
>>
>>> Hi Dariusz,
>>>
>>> I put in attachment the PS file produced with your macro with the new fix 
>>>I just did in order to handle correctly a time offset equal to 0. Let me 
>>>know if it is what you except seems to me it is correct.
>>>
>>> Cheers,          Olivier
>>>
>>>
>>>On Thu, 21 Aug 2003, Dariusz Miskowiec wrote:
>>>
>>>
>>>
>>>>Dear Rooters,
>>>>
>>>>It seems that
>>>>
>>>>gStyle->SetTimeOffset(0);
>>>>hi=new TH1F("nic","nic",10,0,1e8);
>>>>hi->GetXaxis()->SetTimeDisplay(1);
>>>>hi->GetXaxis()->SetTimeFormat("%y:%m:%d");
>>>>hi->Draw();
>>>>
>>>>produces very different numbers on the horizontal axis when
>>>>ran with root 3.03/07 and 3.05/05 on CERN lxplus. The newer
>>>>root version gives a wrong result.
>>>>
>>>>Best regards
>>>>Dariusz Miskowiec
>>>>
>>>>
>>>
>>>
>>
>>
> 


-- 
+-----------------------------------------------------------------+
+  Dariusz Miskowiec                  E-mail: D.Miskowiec@gsi.de  +
+  GSI, Planckstr. 1                  Phone:  0049-6159-712-133   +
+  D-64291 Darmstadt                  Fax:    0049-6159-712-989   +
+-----------------------------------------------------------------+



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET