[rrd-developers] 18:00 yesterday - is this timespec OK?

Pavel Mores pvl at uh.cz
Wed Jan 23 17:59:44 MET 2002



Hello,

I'm building a custom monitoring system based on the wonderful rrdtool.
However, I've been unable to figure out how to use the "yesterday"
day specification. I think that "18:00 yesterday" should be valid
according to the syntax described in parsedate.c . "18:00" looks like a
valid TIME-OF-DAY-SPEC, "yesterday" is included in DAY-SPEC-2 list of
options and together they form a valid TIME-REFERENCE.

Still, the parser refuses it ("ERROR: start time: unparsable trailing
text: '...yesterday'"). Looking at parsetime() it seems to me that
there's a bug in the "case NUMBER:" block. tod() parses the "18:00" part
and prefetches the "yesterday" token. However, if the prefetched token
is not NUMBER (which it is not here) parsing essentially ends here (from
now on the parser looks for offset spec only) so no wonder that
"yesterday" comes out as "unparsable trailing text".

Is this just my stupidity or is it really a bug?

        pvl


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



More information about the rrd-developers mailing list