[rrd-users] Pull request for RRDtool

Jean-Yves Avenard jyavenard at gmail.com
Sat Mar 30 03:22:13 CET 2013

Hi there.

Those are changes I've had for a long time on my local rrd copy. I
remember submitted them a long time ago on the RRD's trac, but it
seems to have got lost in the noise...

For 1.4 branch:

For master:

This add a --utc option to rrdgraph. It allows to draw a graph as if
the current timezone was UTC, ignoring the current environment
timezone setting (e.g. setting TZ=UTC).

The reason I added this option is because I wanted to draw graph from
midnight to midnight in my local timezone, something that would
otherwise require lots of special case handling, calculating your
timezone offset at the time you want to read the data etc... And it
would never look a nice as drawing something from midnight to
Also, changing the TZ environment variable isn't always an option,
especially when running within a web server as it would mess up other
applications running...

Example of the usage is to render that type of graph:

this shows me power consumption for the day as well as my electrical
production and calculate the energy exported in a netfeed system.

When I feed the rrd database with my value, I enter the timestamp as
if I was in UTC. So I only have to worry about timezone calculation at
the time of feeding the data.

Thanks for reading

More information about the rrd-users mailing list