From owner-freebsd-current Mon Apr 22 13: 6:48 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail-blue.research.att.com (mail-blue.research.att.com [135.207.30.102]) by hub.freebsd.org (Postfix) with ESMTP id F192337B416 for ; Mon, 22 Apr 2002 13:06:36 -0700 (PDT) Received: from alliance.research.att.com (alliance.research.att.com [135.207.26.26]) by mail-blue.research.att.com (Postfix) with ESMTP id 72FB34CE1B; Mon, 22 Apr 2002 04:22:35 -0400 (EDT) Received: from windsor.research.att.com (windsor.research.att.com [135.207.26.46]) by alliance.research.att.com (8.8.7/8.8.7) with ESMTP id EAA12772; Mon, 22 Apr 2002 04:22:08 -0400 (EDT) From: Bill Fenner Received: (from fenner@localhost) by windsor.research.att.com (8.8.8+Sun/8.8.5) id BAA11918; Mon, 22 Apr 2002 01:22:08 -0700 (PDT) Message-Id: <200204220822.BAA11918@windsor.research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: des@ofug.org Subject: Re: PAM & OpenSSH: two incorrect "last login" Cc: current@FreeBSD.ORG References: <20020420011633.GA66468@nagual.pp.ru> <200204212015.NAA06317@windsor.research.att.com> Date: Mon, 22 Apr 2002 01:22:08 -0700 Versions: dmail (solaris) 2.4/makemail 2.9b Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Might, might not. ISTR strftime() can't correctly emulate ctime(), >but some other format might be preferrable. Do you have a format >string handy? I'd think something like what "last" does would be good. d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); ... (void) strftime(ct, sizeof(ct), d_first ? (yflag ? "%a %e %b %Y %R" : "%a %e %b %R") : (yflag ? "%a %b %e %Y %R" : "%a %b %e %R"), tm); except you probably want "%T" instead of "%R" if you want the seconds. You could either pretend that yflag was not set (what ache was suggesting) or set yflag if the year of the last login was not this year (possibly more useful). Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message