Date: Tue, 29 Jul 1997 12:41:47 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: brian@awfulhak.org (Brian Somers) Cc: msmith@atrad.adelaide.edu.au, brian@awfulhak.org, freebsd-hackers@FreeBSD.ORG Subject: Re: date(1) Message-ID: <199707290311.MAA09780@genesis.atrad.adelaide.edu.au> In-Reply-To: <199707290257.DAA18266@awfulhak.org> from Brian Somers at "Jul 29, 97 03:57:05 am"
next in thread | previous in thread | raw e-mail | index | archive | help
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 [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707290311.MAA09780>