[rrd-developers] Discuss regarding Ticket 263
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Tue May 25 08:25:26 CEST 2010
----- Original Message -----
From: "Jean-Edouard Babin" <radius at gmail.com>
To: "Alex van den Bogaerdt" <alex at vandenbogaerdt.nl>
Cc: <rrd-developers at lists.oetiker.ch>
Sent: Monday, May 24, 2010 7:19 PM
Subject: Re: [rrd-developers] Discuss regarding Ticket 263
> Yes, conditional (G)PRINT would be better, but rrdtool set a "false"
> default time to the VDEF result anyway.
> > Using 0 was a design choice.
This is not a false timestamp, it is overloaded so to speak, 0 means false,
unset.
> > I don't think time 0 will ever be valid, so instead of adding something
> > to
> > this struct, why not simply if (vdef->when==0) printf("none"); else
> > {...whatever is done now...}
> Imagine someone doing statistic and importing data from 1970 to 2010,
> with one value per month and the fewest one on 1st Jan 1970.
I did back then, read on
> If he wants to print the first value and use a VDEF for that, he would
> not get it's result even if in his case 0 is the correct value.
> From my point of view adding 'never' flag is better as it can't break
> something
Does RRDtool actually work properly when working with timestamps around
1970?
When I programmed the (basics of) VDEF, it didn't. If memory serves me
well, it has been a while, so maybe the next changed, 1980-01-01 or so was
the earliest date one could use (or reliably use).
What timestamp results from local time 1970-01-01 00:00 ? It will result in
0 for the UK, Iceland, and other places where during the winter there's no
time difference with UTC. In a large part of Europe it will be 3600. In
timezones west of Greenwich (UK) it will have to be a negative value. Does
that actually work? West of Greenwich includes the Americas, not really a
small part of the world.
Bottom line:
If things have changed, perhaps 0 is no longer a suitable false value. But
chances are it is as valid as it has been, so then use it.
HTH
Alex
More information about the rrd-developers
mailing list