From: Sam Moore Date: Sat, 19 Oct 2013 07:30:11 +0000 (+0800) Subject: Increase precision of timestamps X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=f6f1a6d46c477dcc7f255d5e88a3dacd70301312;p=matches%2FMCTX3420.git Increase precision of timestamps Since we have nanosecond resolution. Theoretically. --- diff --git a/server/data.c b/server/data.c index dae3172..edfd4c3 100644 --- a/server/data.c +++ b/server/data.c @@ -161,13 +161,13 @@ void Data_PrintByIndexes(DataFile * df, int start_index, int end_index, DataForm switch (format) { case JSON: - fmt_string = "[%f,%f]"; + fmt_string = "[%.9f,%f]"; separator = ','; // For JSON we need an opening bracket FCGI_PrintRaw("["); break; case TSV: - fmt_string = "%f\t%f"; + fmt_string = "%.9f\t%f"; separator = '\n'; break; } diff --git a/server/fastcgi.c b/server/fastcgi.c index d88dc20..a94a5ba 100644 --- a/server/fastcgi.c +++ b/server/fastcgi.c @@ -370,7 +370,7 @@ void FCGI_JSONLong(const char *key, long value) */ void FCGI_JSONDouble(const char *key, double value) { - printf(",\r\n\t\"%s\" : %f", key, value); + printf(",\r\n\t\"%s\" : %.9f", key, value); } /**