From owner-freebsd-hackers Mon Jul 28 20:53:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA04217 for hackers-outgoing; Mon, 28 Jul 1997 20:53:07 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA04211 for ; Mon, 28 Jul 1997 20:53:04 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id NAA10067; Tue, 29 Jul 1997 13:22:44 +0930 (CST) From: Michael Smith Message-Id: <199707290352.NAA10067@genesis.atrad.adelaide.edu.au> Subject: Re: date(1) In-Reply-To: <199707290333.EAA20583@awfulhak.org> from Brian Somers at "Jul 29, 97 04:33:18 am" To: brian@awfulhak.org (Brian Somers) Date: Tue, 29 Jul 1997 13:22:44 +0930 (CST) Cc: msmith@atrad.adelaide.edu.au, brian@awfulhak.org, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Brian Somers stands accused of saying: > > > > Actually, -r is redundant, as +%s will do the same thing. > > Not true. -r takes a ``seconds'' arg, and uses that instead of > calling time(). It's a non-setting input value. Oops, sorry about that. > I can get -r to use strtol(), but do we want to do things the other > way too ? Do we want to be able to output hex too (ie, a change to > strftime(3) - pity %x is gone...) ? On reflection, probably not. Anyone that needs hex can get it with printf(1) already. > > On further thought, an alternative approach would be to use the new > > strptime() function and take a format string for scanning the time, > > much as it takes now for formatting the output. > > This would allow us to change (say) the current month without touching > the time..... how new is "strptime" ? It ain't on my machine (supped > 1.5 hours ago). Uhh. Perhaps it didn't get committed; it should have. Chase the -hackers mailing list for the perp who had it ready. I do think it is a better way to go than having a whole bag of new flags. -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[