syslog

Dan Nelson dnelson at allantgroup.com
Sat Jan 3 14:46:43 PST 2004


In the last episode (Jan 04), Eugene Grosbein said:
> ache at freebsd.org wrote 8 years ago in src/lib/libc/gen/syslog.c:
> 
> p += sprintf(p, "%.15s ", ctime(&now) + 4);
> 
> What is '+ 4' for?

ctime returns a date in the format:

Thu Nov 24 18:22:48 1986\n\0

The +4 skips the day name.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list