At 21:22 2003-07-01, you wrote: >can someone give me an example of how this works? the >description is very difficult to understand :/ >(I am not a programmer) Doing a google search for this >turns up absolutely nothing! was suprised.
Since I only wrote the patch that implemented it a couple of weeks ago, I'm not surprised. >no matter what I do RRDTool seems to ignore the variable >(prints nothing, not even an error) > >e.g. > ><RRD::TIME::STRFTIME START -2d -2w %c> This is wrong, but ought to work anyway: the start is after the end. Yup. I just tried it and it works fine with the test script: ------ cut here ------ #!/usr/local/rrdtool/bin/rrdcgi <HTML> <HEAD> </HEAD> <BODY BGCOLOR="#FFFFFF"> Time was <RRD::TIME::STRFTIME START -1w -2w "%Y-%m-%d %H:%M:%S %Z"> now. </BODY> </HTML> ------ cut here ------ Are you invoking the patched version of rrdcgi? What happens when you run the script from the command-line, like: xyzzy.cgi </dev/null >that's probably totally wrong but it just goes to show how >confused I am by the description on the manpage :) Complain at me, as I wrote the patch to both rrdcgi and the manpage. The intent is to be able to format start or end time specifications into whatever format you want (as long as strftime can handle it). The problem, which makes it a bit messy, is that either of the start or end specifications (but not both) could be relative to the other. I.E. the start could be "end-2days". Rather than try to get fancy, I coded it to require both the start and end times, even if they weren't relative. If you understand now, please re-write the man-page section for RRD::TIME::STRFTIME so that it's clearer, forward it to me and I'll make a new patch for the man-page to make it clearer. Currently it says: RRD::TIME::STRFTIME START|END start-spec end-spec strftime-format This gets replaced by a strftime-formatted time using the for- mat strftime-format on either start-spec or end-spec depending on whether START or END is specified. Both start-spec and end- spec must be supplied as either could be relative to the other. This is intended to allow pretty titles on graphs with times that are easier for non rrdtool folks to figure out than "-2weeks". Which I thought was clear enough, though dense. >running rrdtool 1.0.42-2 on debian/sparc > >thanks! > >nate >-- >Unsubscribe mailto:[EMAIL PROTECTED] >Help mailto:[EMAIL PROTECTED] >Archive http://www.ee.ethz.ch/~slist/rrd-users >WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi Thomas Erskine <[EMAIL PROTECTED]> +1.613.591.8490 -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi