[rrd-users] Re: RRDTool Timestamp

Alex van den Bogaerdt alex at ergens.op.HET.NET
Sun Jul 7 20:28:41 MEST 2002


Greg Cirino wrote:

(could you please keep lines below 80 chars? Thanks)

> I'm new to rrdtool and was wondering why the timestamp on the records
> returned using fetch when converted represent the previous month?

You're probably referring to the localtime function.  This
function does not return the month number, it returns the
number of months that have passed since the start of the year.

This means that 0 means januari, 1 means februari and so on.

Try this to convert the times:
    perl -e 'use POSIX;print ctime(1025555400);'
result:
    Mon Jul  1 22:30:00 2002

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list