[rrd-users] Once a day updates incorrect by timezone

Tobias Oetiker tobi at oetiker.ch
Fri Aug 20 15:07:53 CEST 2010


Today brettow wrote:

> I spoke to soon. smiley image='smiley_blush.gif'/>
> I recreated the database from the 16th Aug 00:00 UTC and manually updated it
> a few times however Im still getting the offset when I graph.
> Just the top graph on -> http://powermonitoring.zzl.org/Xantrex_Totals.html
> Using fetch I get the following which looks correct and if I convert the
> epoch time in the lines that I have updated it gives me UTC 00:00. So is it
> something I need to do when I create the graphs to tell it to use UTC time
> ??

a) when generating the graph rrdtool must beleive its timezone to
   be UTC on unix this is done by setting the environment variable TZ
   to 'GMT' for the rrdtool process. Don't know how this works on
   windows ...

b) when entering your data for 0:00 local time, you must devise the
   epoch timestamp for 0:00 utc of the same data ... this is done
   by subtracting the time difference from localtime to utc.


> Thanks
> Brett
> E:\Power_Mon\rrdtool>rrdtool fetch Xantrex_Daily_Totals.rrd MAX -s -7d
>                       KWH_Today          INV_Online              PEAK_W
> 1281744000: -1.#IND000000e+000 -1.#IND000000e+000 -1.#IND000000e+000
> 1281830400: -1.#IND000000e+000 -1.#IND000000e+000 -1.#IND000000e+000
> 1281916800: 1.1600000000e+001 9.5100000000e+000 0.0000000000e+000
> 1282003200: 1.1600000000e+001 1.0100000000e+001 0.0000000000e+000
> 1282089600: 9.9000000000e+000 1.0400000000e+001 0.0000000000e+000
> 1282176000: 9.8000000000e+000 1.0000000000e+001 0.0000000000e+000
> 1282262400: 1.1800000000e+001 1.0500000000e+001 0.0000000000e+000
> 1282348800: -1.#IND000000e+000 -1.#IND000000e+000 -1.#IND000000e+000<

Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900

More information about the rrd-users mailing list