months in CSV should start from zero #272
Costa Tsaousis (ktsaou) committed
Apr 19, 2016 at 11:16 UTC
e94493d439f5b765a452787ce1d2534c127f3326
1 file changed
+1
-1
src/rrd2json.c
+1
-1
@@ -936,7 +936,7 @@ static void rrdr2csv(RRDR *r, BUFFER *wb, uint32_t options, const char *startlin
936
// generate the local date time
937
struct tm tmbuf, *tm = localtime_r(&now, &tmbuf);
938
if(!tm) { error("localtime() failed."); continue; }
939
- buffer_date(wb, tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
939
+ buffer_date(wb, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
940
}
941
942
if(unlikely(options & RRDR_OPTION_PERCENTAGE)) {