fix for : in piped demo
[rrdtool.git] / examples / piped-demo.pl.in
index 7a3a72e..82232fb 100755 (executable)
@@ -69,6 +69,8 @@ print "\n";
 
 print "* Creating $GRUNS SVG graphs: $SVG\n\n";
 $now = time;
+$localtime = scalar localtime(time);
+$localtime = s/:/\\:/g;
 for ($i=0;$i<$GRUNS;$i++) {
 RRDp::cmd "graph $SVG ", "--title 'Test GRAPH' ",
        "--imgformat SVG --height 150 --vertical-label 'Dummy Units' ".
@@ -88,7 +90,7 @@ RRDp::cmd "graph $SVG ", "--title 'Test GRAPH' ",
        "GPRINT:calc:MAX:'Max calc\\: %1.2lf %S'",
         "VRULE:".($now-3600)."#008877:'60 Minutes ago'",
         "COMMENT:'\\s'",
-        "COMMENT:'Graph created on\\: ".localtime(time())."\\c'";
+        "COMMENT:'Graph created on\\: ".$localtime."\\c'";
 
 $answer = RRDp::read;
 }