[rrd-users] Showing daily average ; from midnight to midnight local time
jyavenard at gmail.com
Thu Dec 10 11:06:15 CET 2009
2009/12/9 Jean-Yves Avenard <jyavenard at gmail.com>:
> I thought that another possibility would be to always store data in
> local time as if it was UTC time ; obviously twice a year it would be
> incorrect for one hour ... something I can probably live with...
this is what I have done now...
When storing in the RRD database; I add the current time offset to the
timestamp ; set the timezone to UTC and call rrdtool update.
So as far as RRD is concerned ; midnight local = midnight UTC
When displaying the graph ; I do all my calculation as if I was in
local time ; and before calling rrdtool I add to all timestamp the
local time offset with UTC ; switch the timezone to UTC and call
Now my daily average appears like I intended: from midnight to
midnight local time...
I've noticed some inconsistencies between daily average when I
calculate it manually between using the 5 minutes average as a basis
or the 1 hour average as a basis...
Thank you all for your help.
More information about the rrd-users