Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: support for nanosecond timestamps
- X-seq: zsh-workers 24060
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: PATCH: support for nanosecond timestamps
- Date: Mon, 5 Nov 2007 15:26:48 +0000
- Cc: Zsh workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <2449.1194273950@thecus>
- Mail-followup-to: Oliver Kiddle <okiddle@xxxxxxxxxxx>, Zsh workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <22003.1193931601@dcle12> <20071101155035.GA27981@xxxxxxxxxxxxxxx> <23800.1193938673@thecus> <20071104171456.5d873459.p.w.stephenson@xxxxxxxxxxxx> <2449.1194273950@thecus>
On Mon, Nov 05, 2007 at 02:45:50PM +0000, Oliver Kiddle wrote:
[...]
> Formats like %.9s make a certain amount of logical sense though you
> might expect that to output the seconds too, e.g.: 23.562827621
> It might be better to allow %6N and %3N given that %N is a non-standard
> extension already.
[...]
Again, ksh93:
$ ksh -c 'printf "%(%.s)T\n"'
1194276214.312372000
$ ksh -c 'printf "%(%.9s)T\n"'
1194276216.337172000
$ ksh -c 'printf "%(%.3s)T\n"'
1194276220.963
$ ksh -c 'printf "%(%s)T\n"'
1194276238
$ ksh -c 'printf "%(%N)T\n"'
001528000
$ ksh -c 'printf "%(%3N)T\n"'
576
$ ksh -c 'printf "%(%6N)T\n"'
825647
For %<x>N, the question is: "should they be zero-padded?"
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author