From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 3 13:47:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 747F316A4CE for ; Sat, 3 Jan 2004 13:47:38 -0800 (PST) Received: from mag.barnet.com.au (mag.barnet.com.au [218.185.88.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5596143D31 for ; Sat, 3 Jan 2004 13:47:37 -0800 (PST) (envelope-from edwin@mavetju.org) Received: from extmail.barnet.com.au (tim.direct.int.barnet.com.au [10.10.10.2]) by mag.barnet.com.au (Postfix) with ESMTP id B49541406; Sun, 4 Jan 2004 08:47:34 +1100 (EST) X-Viruscan-Id: <3FF738760000F53C01E612BE@VIRUSCAN-127.0.0.1> Received: from extmail-auth.barnet.com.au (localhost [127.0.0.1]) by extmail.barnet.com.au (Postfix) with ESMTP id 76F2A1EE3; Sun, 4 Jan 2004 08:47:34 +1100 (EST) Received: from k7.mavetju (unknown [192.168.1.1]) by extmail-auth.barnet.com.au (Postfix) with ESMTP id 08A2F1E19; Sun, 4 Jan 2004 08:47:33 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 7726E6A7101; Sun, 4 Jan 2004 08:47:31 +1100 (EST) Date: Sun, 4 Jan 2004 08:47:31 +1100 From: Edwin Groothuis To: Eugene Grosbein Message-ID: <20040103214731.GA59347@k7.mavetju> References: <3FF714C6.1D099404@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FF714C6.1D099404@grosbein.pp.ru> User-Agent: Mutt/1.4.1i cc: hackers@freebsd.org Subject: Re: syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2004 21:47:38 -0000 On Sun, Jan 04, 2004 at 02:15:18AM +0700, Eugene Grosbein wrote: > Hi! > > 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: Thu Nov 24 18:22:48 1986\n\0 So ctime()+4 returns: Nov 24 18:22:48 1986\n\0 In other words, it skips the day of the week. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/