From: Eduardo Bragatto Date: Mon, 17 Nov 2014 23:56:20 +0000 (-0200) Subject: Fixed starting time, still need to review ending time X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=343ce597255ac908777f0cafd25cb99b0628ae78;p=thirdparty%2Frrdtool-1.x.git Fixed starting time, still need to review ending time --- diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 8cec0a89..6fdced7b 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -748,7 +748,7 @@ int HandleInputLine( printf(indent "<%s>" fmt "\n",tag,value,tag); \ } - pXJV(" ","%lld",META_START_TAG,(long long int) start + step); + pXJV(" ","%lld",META_START_TAG,(long long int) start); pXJV(" ","%lu", META_STEP_TAG, step); pXJV(" ","%lld",META_END_TAG,(long long int)end); if (! json){ @@ -792,7 +792,7 @@ int HandleInputLine( } else { printf(" <%s>\n", DATA_TAG); } - for (ti = start + step; ti <= end; ti += step) { + for (ti = start; ti <= end; ti += step) { if (json){ printf(" [ "); } diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 20c88ac7..adc4078c 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -286,6 +286,9 @@ int rrd_xport_fn( free(step_list); *start = im->start - im->start % (*step); + if ( im->start > *start ) { + *start = *start + *step; + } *end = im->end - im->end % (*step) + (*step);