]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fixed starting time, still need to review ending time
authorEduardo Bragatto <eduardo@bragatto.com>
Mon, 17 Nov 2014 23:56:20 +0000 (21:56 -0200)
committerEduardo Bragatto <eduardo@bragatto.com>
Mon, 17 Nov 2014 23:56:20 +0000 (21:56 -0200)
src/rrd_tool.c
src/rrd_xport.c

index 8cec0a890ab408d91d12335e3a7be94ad28a3879..6fdced7bd8f9d2dda39f6e54985849a7037c659f 100644 (file)
@@ -748,7 +748,7 @@ int HandleInputLine(
                printf(indent "<%s>" fmt "</%s>\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("    [ ");
                 }
index 20c88ac72cc08fe145eef93b3794310540e735dd..adc4078c246b3745bc1878ec3b064eb8a22a42b6 100644 (file)
@@ -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);