fix print of millisec

This commit is contained in:
CK Tan 2021-07-05 09:51:50 -07:00
parent 6b49aaf863
commit 4636173fed

View file

@ -74,7 +74,7 @@ static void print_raw(const char* s)
} else if (0 == toml_rtots(s, &ts)) { } else if (0 == toml_rtots(s, &ts)) {
char millisec[10]; char millisec[10];
if (ts.millisec) if (ts.millisec)
sprintf(millisec, ".%d", *ts.millisec); sprintf(millisec, ".%03d", *ts.millisec);
else else
millisec[0] = 0; millisec[0] = 0;
if (ts.year && ts.hour) { if (ts.year && ts.hour) {