time axis

From: Marina Giunta <giunta_at_mail.cern.ch>
Date: Wed, 27 Apr 2005 11:12:01 +0200 (CEST)


Hello,
I'm trying to draw a plot of some value vs. time. I get the values from an Oracle db, then I convert the times to  a string with the right format to be used in the TDatime constructor, then I convert the TDatime to time_t and I plot the values. The problem is that in the plot the year displayed is 2030 instead of 2005 (day and month are OK)!
I suspect that the TDatime::Convert() gives me the seconds since the EPOCH (i.e. 00:00:00 on Jan 1st 1970), while the origin of the plot time axis is 00:00:00 on Jan 1st 1995. Is that correct? If yes, which is the best way to solve this problem? Simply subtract 25 years from my time_t value?

Second question: the date I get from the Oracle db is in GMT, I'd like to have the local time displayed on the plot. How can I convert the values?  

Thanks

               MArina

-- 
Marina Giunta 

-----------------------------------------------
Department of Physics, | At CERN UC Riverside, | OFF: 28-2-006 Riverside CA92521 USA | TEL: +41-22-76-78178
-----------------------------------------------
Received on Wed Apr 27 2005 - 11:12:06 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET