Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jan 2004 16:46:41 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Eugene Grosbein <eugen@grosbein.pp.ru>
Cc:        ache@freebsd.org
Subject:   Re: syslog
Message-ID:  <20040103224641.GC99735@dan.emsphone.com>
In-Reply-To: <3FF714C6.1D099404@grosbein.pp.ru>
References:  <3FF714C6.1D099404@grosbein.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 04), Eugene Grosbein said:
> ache@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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040103224641.GC99735>