Re: TDatetime and Y2K problem

Rene Brun (Rene.Brun@cern.ch)
Tue, 15 Sep 1998 00:37:51 +0200


Valery Fine wrote:
>
> Dear ROOT team,
>
> Will the class TDatime (been saved) work in 1.5 years:
>
> void TDatime::Set(Int_t date, Int_t time)
> {
> // Set date and time. Data must be in format 980418 and time in, either
> // 2246 (min precision) or 224512 (second precision). The date must
> // be >= 950101.
>
> if (date < 950101) {
> Error("TDatime::Set", "year smaller than 1995");
> return;
> }
>

The class TDatime stores the year in 5 bits. Our reference year
is 1995 and this will be valid until 1995+32.
I assume that the convention for the year 2000 and above will be
to specify 2000, 2001 and not 0 ,1.
I have implemented a protection in TDatime::Set for years >= 2000,
but the dates stored in Root files will still be valid.
On Unix systems, there is a different problem. In principle,
Unix dates are valid until 2005 only. This has nothing to do
with the internal storage in Root.

Rene Brun