From owner-freebsd-hackers Mon Jul 28 20:12:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA00779 for hackers-outgoing; Mon, 28 Jul 1997 20:12:12 -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 UAA00754 for ; Mon, 28 Jul 1997 20:12:06 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id MAA09780; Tue, 29 Jul 1997 12:41:47 +0930 (CST) From: Michael Smith Message-Id: <199707290311.MAA09780@genesis.atrad.adelaide.edu.au> Subject: Re: date(1) In-Reply-To: <199707290257.DAA18266@awfulhak.org> from Brian Somers at "Jul 29, 97 03:57:05 am" To: brian@awfulhak.org (Brian Somers) Date: Tue, 29 Jul 1997 12:41:47 +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: > Yep. I think I'll fix the usage message too - shouldn't it be: > > [[yy[mm[dd[hh]]]]mm[.ss]] That'd be consistent with the manpage. > > - The ability to input and output the timestamp in decimal or hex > > localtime() format, ie. 0xXXXXXXXX or DDDDDDDDDD > > Do you mean to output the actual "number of seconds since the epoch", > as in the opposite of the -r option ? -r emits seconds since the epoch in decimal. At the very least, -r with a timevalue argument should set the time in seconds, preferably using strtoul so that it can handle decimal, hex and octal. Actually, -r is redundant, as +%s will do the same thing. 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. -- ]] 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 [[