X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=include%2Fclasses%2Frrdstat.php-class;h=aa7079d1892f095ceb378378183ef75d977ed393;hp=55d0c37a3ff1d310d18e5299b38948fec1f62298;hb=c797f39a6abd6294e222b01d9be5d53ef442462a;hpb=cf2bc478bb9058a3b4e1f716c04dc3854728fb76;ds=inline diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 55d0c37..aa7079d 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -440,11 +440,11 @@ class rrdstat { if (!is_numeric($end)) { $end = $this->last_update(); } elseif ($end < 0) { $end += $this->last_update(); } $end = intval($end/$resolution)*$resolution; - if (!is_numeric($start)) { $start = $end; } + if (!is_numeric($start)) { $start = $end-$resolution; } elseif ($start < 0) { $start += $end; } $start = intval($start/$resolution)*$resolution; - $fetch_cmd = $this->rrdtool_bin.' fetch '.$this->rrd_file.' '.$cf.' --resolution '.$resolution + $fetch_cmd = 'LANG=C '.$this->rrdtool_bin.' fetch '.$this->rrd_file.' '.$cf.' --resolution '.$resolution .' --start '.$start.' --end '.$end; $return = `$fetch_cmd 2>&1`;