Re: time axis

From: Olivier Couet <couet_at_mail.cern.ch>
Date: Wed, 27 Apr 2005 11:32:08 +0200 (CEST)

Hello,

 Can you send me an small example showing your problem ?

 Cheers, Olivier

On Wed, 27 Apr 2005, Marina Giunta wrote:

> 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
>
>

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet_at_cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7670300
Received on Wed Apr 27 2005 - 11:32:14 MEST

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