I want to plot an histogram with the date on the X axis. I’m using an offset to define the start of the histogram. Here is a simplified example of what I want to do:
TH1D *H = new TH1D("test","test",300,0,300);
H->GetXaxis()->SetTimeDisplay(1);
H->GetXaxis()->SetTimeFormat("%H:%M%F2013-02-14 00:00:00");
H->Draw();
As you can see I want the histogram to start at 2013-02-14 00:00:00
Instead of this, it starts at 2013-02-14 01:00:00.
Can you tell me why I have a 1 hour offset? I suspect that this is currently summer time and the date I’m providing is in the winter time. Is that right? If so, how can I compensate this effect?
I think it’s indeed due to summer time handling and as far as I see currently there’s no way to turn it off, which is a problem (although I haven’t tested the latest ROOT versions). I’m not aware of a good solution to compensate the differences; maybe taking the compensation into account manually in the offset (hack) will do while waiting for better solution?
Thank you for your answer eventhough it is disappointed
Do you have any suggestion how to compute this time offset to correct this problem? I’m not very good with time conversions, offsets and so on…
Thank you.
Just try it and zoom on the origin. You will see the hour does not match.
I’m using ROOT 5.34.03. Was this bug corrected in a more recent version?
Thanks,