]> arthur.barton.de Git - netdata.git/commitdiff
fix invalid javascript date generation, introduced with #299
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 23 Apr 2016 00:07:23 +0000 (03:07 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 23 Apr 2016 00:07:23 +0000 (03:07 +0300)
src/web_buffer.c

index 58214a891a1710c078a7c422612130d10cc66549..b1735b529a5614f441cc82f6d167ff997248a815 100644 (file)
@@ -207,7 +207,7 @@ void buffer_jsdate(BUFFER *wb, int year, int month, int day, int hours, int minu
   *p++ = '0' + year / 1000; year %= 1000;
   *p++ = '0' + year / 100;  year %= 100;
   *p++ = '0' + year / 10;
-  *p++ = '0' + year % 100;
+  *p++ = '0' + year % 10;
   *p++ = ',';
   *p   = '0' + month / 10; if (*p != '0') p++;
   *p++ = '0' + month % 10;