[rrd-users] RRD and PHP Date not working
Berny Stapleton
berny at technology.net.au
Wed Aug 29 19:10:47 CEST 2012
Hi there,
I'm using RRDTool 1.3.8 with php-pecl-rrd on CentOS 6.
I'm trying to put a comment onto a graph, and it doesn't like the
colon. I've looked through the list archives and I'm not coming up
with the right answer or syntax to make this work...
So I've got this:
$date = new DateTime("now", new DateTimeZone('Europe/Dublin'));
$dateoutput = $date->format("d M Y G\\:i\\:s");
"COMMENT:Created on $dateoutput",
I've tried \\ and \ and nothing seems to get me over this hump, I'm
still getting " 'Exception' with message 'I don't understand ':25:49'
in command: 'COMMENT:Created on 29 Aug 2012 17:25:49'"
So, what I've seen in the list is that appending :strftime works, but
this seems to exist only under perl and not pecl-rrd; well, maybe I've
got it wrong, but when I tried it I got:
"'I don't understand ':35:08:strftime' in command: 'COMMENT:Created on
29 Aug 2012 16:35:08:strftime'"
Does anyone know how to get around this in PHP?
Thanks,
Berny
More information about the rrd-users
mailing list