diff -r 94c649383b95 sys/man/2/perror --- a/sys/man/2/perror Tue Feb 09 16:24:41 2016 -0500 +++ b/sys/man/2/perror Tue Feb 09 19:54:00 2016 -0500 @@ -36,8 +36,8 @@ .I Logname must contain no slashes. The message is a line with several fields: +seconds since the epoch; the name of the machine writing the message; -the date and time; the message specified by the .IR print (2) format diff -r 94c649383b95 sys/src/libc/9sys/syslog.c --- a/sys/src/libc/9sys/syslog.c Tue Feb 09 16:24:41 2016 -0500 +++ b/sys/src/libc/9sys/syslog.c Tue Feb 09 19:54:00 2016 -0500 @@ -43,7 +43,7 @@ syslog(int cons, char *logname, char *fmt, ...) { char buf[1024]; - char *ctim, *p; + char *p; va_list arg; int n; Dir *d; @@ -92,11 +92,7 @@ return; } - ctim = ctime(time(0)); - p = buf + snprint(buf, sizeof(buf)-1, "%s ", sysname()); - strncpy(p, ctim+4, 15); - p += 15; - *p++ = ' '; + p = buf + snprint(buf, sizeof(buf)-1, "%ld %s ", time(0), sysname()); errstr(err, sizeof err); va_start(arg, fmt); p = vseprint(p, buf+sizeof(buf)-1, fmt, arg);