Time axis is modified by Scale method in TH1

Dear ROOTers
Using the ROOT 5.15.01 and 5.12/00f on Linux (sorry, not the latest one),
I found some strange feature in Scale method of TH1.
Please try the following core on your machine.

void timetest2() {
  TDatime sdate(2006, 05, 20, 00, 00, 00);
  gStyle->SetTimeOffset(sdate.Convert());

  TH1F *h = new TH1F("h", "", 86400, 0, 86400);
  for ( Int_t i = 1; i<86400>SetBinContent(i, 1);}
  h->GetXaxis()->SetTimeDisplay(1);
  h->GetXaxis()->SetTimeFormat("%y/%m/%d/%H:%M");
  
  TCanvas *c = new TCanvas("c", "", 50, 50, 900, 600);
  c->Divide(1, 2);
  c->cd(1);
  gPad->SetGridx();
  h->Draw();

  c->cd(2);
  TH1F *h2 = (TH1F*)h->Clone("h2");
  gPad->SetGridx();
  h2->Scale(0.5);
  h2->Draw();
}

The time axis in h2 is strange, extending to 2006/5/22 instead of 2006/5/21. Both time axis range should be the same.
In the macro, if I comment out h2->Scale(0.5), I can obtain
the correct time axis range in both h and h2.

please give me any idea.

I try the macro on Linux 2.6.18 of Fedora Core 6 with gcc 4.1.1

Your macro code has been corrupted.
Can you resend it but as an attachment.
Sometimes it does not work when you put it inline.

If you put inline code, always:
-select the option Code
-click the check box "Disable html in this post"
otherwise text involving arrows will be interpreted as html

Rene

I re-send only my macro.

void timetest2() {
  TDatime sdate(2006, 05, 20, 00, 00, 00);
  gStyle->SetTimeOffset(sdate.Convert());

  TH1F *h = new TH1F("h", "", 86400, 0, 86400);
  h->Sumw2();
  for ( Int_t i = 1; i <= 86400; i++ ) {
    h->SetBinContent(i, 1);
  }
  h->GetXaxis()->SetTimeDisplay(1);
  h->GetXaxis()->SetTimeFormat("%y/%m/%d/%H:%M");
  cout << sdate.GetDate() " " << sdate.GetTime() << endl;
  TCanvas *c = new TCanvas("c", "", 50, 50, 900, 600);
  c->Divide(1, 2);
  c->cd(1);
  gPad->SetGridx();
  h->Draw();

  c->cd(2);
  TH1F *h2 = (TH1F*)h->Clone("h2");
  gPad->SetGridx();
  h2->Scale(0.5);
  h2->Draw();
}

This is now fixed in the CVS head. Thanks to have reported it.