--- sntp/main.c-myorig	2012-07-23 17:28:05.000000000 +0200
+++ sntp/main.c	2012-07-23 17:33:56.000000000 +0200
@@ -222,9 +222,8 @@
 to SNTP. */
 
 typedef struct NTP_DATA {
-    unsigned char status, version, mode, stratum, polling;
+    unsigned char status, version, mode, stratum, polling, precision;
     unsigned char refid[5];
-    signed char precision;
     double dispersion, reference, originate, receive, transmit, current;
 } ntp_data;
 
@@ -245,7 +244,7 @@
 void unpack_ntp(ntp_data *, unsigned char *, int);
 void make_packet(ntp_data *, int);
 int read_packet(int, ntp_data *, double *, double *);
-void format_time(char *, int, double, double, double, double, int);
+void format_time(char *, int, double, double, double, double);
 double reset_clock(double, double, int);
 void run_server(void);
 double estimate_stats(int *, int *, data_record *, double, double *, double *,
@@ -552,7 +551,7 @@
 
 
 void format_time (char *text, int length, double offset, double error,
-    double drift, double drifterr, int precision) {
+    double drift, double drifterr) {
 
 /* Format the current time into a string, with the extra information as
 requested.  Note that the rest of the program uses the correction needed, which
@@ -575,14 +574,12 @@
     errno = 0;
     if ((gmt = localtime(&now)) == NULL)
         fatal(1,"unable to work out local time",NULL);
-    len = 21;
+    len = 24;
     if (length <= len) fatal(0,"internal error calling format_time",NULL);
     errno = 0;
-    precision /= -3;
-    len += precision;
-    sprintf(text,"%.4d %s %.2d %.2d:%.2d:%.2d.%.*d",
+    sprintf(text,"%.4d %s %.2d %.2d:%.2d:%.2d.%.3d",
             gmt->tm_year+1900,months[gmt->tm_mon],gmt->tm_mday,
-            gmt->tm_hour,gmt->tm_min,gmt->tm_sec,precision,milli);
+            gmt->tm_hour,gmt->tm_min,gmt->tm_sec,milli);
     if (strlen(text) != len)
         fatal(1,"unable to format current local time",NULL);
 
@@ -592,9 +589,8 @@
         if (length < len+30)
             fatal(0,"internal error calling format_time",NULL);
         errno = 0;
-        sprintf(&text[len]," %c %.*f +/- %.*f secs",(offset > 0.0 ? '-' : '+'),
-		precision,(offset > 0.0 ? offset : -offset),
-		precision,dispersion+error);
+        sprintf(&text[len]," %c %.3f +/- %.3f secs",(offset > 0.0 ? '-' : '+'),
+                (offset > 0.0 ? offset : -offset),dispersion+error);
         if (strlen(&text[len]) < 22)
             fatal(1,"unable to format clock correction",NULL);
     }
@@ -671,7 +667,7 @@
     adjust_time(offset,(action == action_reset ? 1 : 0),
         (daemon ? 2.0*minerr : 0.0));
     if (daemon ? verbose > 1 : verbose) {
-        format_time(text,50,0.0,-1.0,0.0,-1.0,-10);
+        format_time(text,50,0.0,-1.0,0.0,-1.0);
         fprintf(stderr,
             "%s: time changed by %.3f secs to %s +/- %.3f+%.3f\n",
             argv0,offset,text,dispersion,error);
@@ -1104,14 +1100,14 @@
 
     previous = when = current_time(JAN_1970);
     if (verbose > 2) {
-        format_time(text,50,0.0,-1.0,0.0,-1.0,-10);
+        format_time(text,50,0.0,-1.0,0.0,-1.0);
         fprintf(stderr,"Started=%.6f %s\n",when,text);
     }
     handle_saving(save_read_only,&total,&index,&cycle,record,&previous,&when,
         &correction);
     estimate_stats(&total,&index,record,correction,&dispersion,
         &when,&offset,&error,&drift,&drifterr,&waiting,0);
-    format_time(text,100,offset,error,drift,drifterr,-10);
+    format_time(text,100,offset,error,drift,drifterr);
     printf("%s\n",text);
     if (fclose(savefile)) fatal(1,"unable to close daemon save file",NULL);
     if (verbose > 2) fprintf(stderr,"Stopped normally\n");
@@ -1148,7 +1144,7 @@
 
     started = previous = when = current_time(JAN_1970);
     if (verbose > 2) {
-        format_time(text,50,0.0,-1.0,0.0,-1.0,-10);
+        format_time(text,50,0.0,-1.0,0.0,-1.0);
         fprintf(stderr,"Started=%.6f %s\n",when,text);
     }
     if (initial) {
@@ -1195,7 +1191,7 @@
             if (operation == op_listen)
                 fprintf(stderr," rep. %.0f skip %.0f",replicates,skips);
             fprintf(stderr," max.off. %.3f corr. %.3f\n",maxoff,correction);
-            format_time(text,100,offset,error,drift,drifterr,-10);
+            format_time(text,100,offset,error,drift,drifterr);
             fprintf(stderr,"%s: %s\n",argv0,text);
             maxoff = 0.0;
         }
@@ -1344,7 +1340,7 @@
         correction = 0.0;
         if (operation == op_client || accepts >= count) {
             if (action == action_display) {
-                format_time(text,100,offset,error,drift,drifterr,-10);
+                format_time(text,100,offset,error,drift,drifterr);
                 printf("%s\n",text);
             } else {
                 x = reset_clock(offset,error,1);
@@ -1392,7 +1388,7 @@
     char text[100];
 
     if (verbose > 2) {
-        format_time(text,50,0.0,-1.0,0.0,-1.0,-10);
+        format_time(text,50,0.0,-1.0,0.0,-1.0);
         fprintf(stderr,"Started=%.6f %s\n",current_time(JAN_1970),text);
     }
     for (k = 0; k < nhosts; ++k) open_socket(k,hostnames[k],delay);
@@ -1531,7 +1527,7 @@
         fprintf(stderr,"Correction: %.6f +/- %.6f disp=%.6f\n",
             offset,error,dispersion);
     if (action == action_display) {
-        format_time(text,75,offset,error,0.0,-1.0,precision);
+        format_time(text,75,offset,error,0.0,-1.0);
         printf("%s\n",text);
     } else
         (void)reset_clock(offset,error,0);
