4 * uglydate - convert a time stamp to something barely readable
5 * The string returned is 37 characters long.
10 #include "ntp_unixtime.h"
11 #include "lib_strbuf.h"
12 #include "ntp_stdlib.h"
27 timep
= ulfptoa(ts
, 6); /* returns max 17 characters */
29 sec
= ts
->l_ui
- JAN_1970
;
30 msec
= ts
->l_uf
/ 4294967; /* fract / (2**32/1000) */
34 * Probably not a real good thing to do. Oh, well.
46 (void) sprintf(bp
, "%17s %02d:%03d:%02d:%02d:%02d.%03ld",
47 timep
, year
, tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
,