Leapyear, SetTimeDisplay problem

Hi,
the att. macro shows Feb 29, 2019

void tleap()
{
	TDatime dt;
	dt.Set(2019,2,27,0,0,0);
	UInt_t startt = dt.Convert();
	dt.Set(2019,3,3,0,0,0);
	UInt_t endt = dt.Convert();
	auto h3 = new TH1F("ttt", "ttt", 1000, (Double_t)startt, (Double_t)endt);
	h3->GetXaxis()->SetTimeDisplay(1);
	h3->Draw();
}

Cheers
Otto


_ROOT Version:_6.16.00.
Platform: Ub 16.04.05
Compiler: gcc 5.4.0


Hi Otto,

Try to call:

h3->GetXaxis()->SetTimeOffset(0);

Without it your dates are in year 2044.

Regards,
Sergey

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.