From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: PATCH: support for nanosecond timestamps
Date: Mon, 5 Nov 2007 15:26:48 +0000 [thread overview]
Message-ID: <20071105152648.GA5399@sc.homeunix.net> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2007-11-05 15:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 15:40 Oliver Kiddle
2007-11-01 15:50 ` Stephane Chazelas
2007-11-01 17:37 ` Oliver Kiddle
2007-11-01 18:28 ` Stephane Chazelas
2007-11-04 17:14 ` Peter Stephenson
2007-11-05 14:45 ` Oliver Kiddle
2007-11-05 15:26 ` Stephane Chazelas [this message]
2007-11-05 15:31 ` Peter Stephenson
2007-11-04 16:46 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071105152648.GA5399@sc.homeunix.net \
--to=stephane_chazelas@yahoo.fr \
--cc=okiddle@yahoo.co.uk \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).