From: Costa Tsaousis (ktsaou) Date: Tue, 19 Apr 2016 08:16:49 +0000 (+0300) Subject: months in CSV should start from zero #272 X-Git-Tag: v1.1.0~4^2~1 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=e94493d439f5b765a452787ce1d2534c127f3326;p=netdata.git months in CSV should start from zero #272 --- diff --git a/src/rrd2json.c b/src/rrd2json.c old mode 100644 new mode 100755 index ad453cb6..88a75044 --- a/src/rrd2json.c +++ b/src/rrd2json.c @@ -936,7 +936,7 @@ static void rrdr2csv(RRDR *r, BUFFER *wb, uint32_t options, const char *startlin // generate the local date time struct tm tmbuf, *tm = localtime_r(&now, &tmbuf); if(!tm) { error("localtime() failed."); continue; } - buffer_date(wb, tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); + buffer_date(wb, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); } if(unlikely(options & RRDR_OPTION_PERCENTAGE)) {