From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23614 invoked by alias); 19 Jun 2018 17:32:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43070 Received: (qmail 1302 invoked by uid 1010); 19 Jun 2018 17:32:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-io0-f180.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.223.180):SA:0(-1.9/5.0):. Processed in 1.315232 secs); 19 Jun 2018 17:32:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=S4Ctg179hvNx+mcqvNvbFl8e+KH7he3Z+aLQxuF3iGU=; b=qC9JacQ5wnArOb9h0LXB+cx8qpqeIwNHgy97EVxVTx651U30/VKmNCCazI0ZqUXxxk O929E/TGS82tdoanx7qcIfG99VrtReiRHXasMIG16Kmg0N0hQgyQ+XAjj4ap7ag6Db30 CqFe+4TsGVC3/Bhi+Wb91V7I2kaL3xCM8XIutkNDzgf7yz4W2S4LqsU5lBmpJeDvP374 LUkdSR94A+7h2IS0bKI1KAthQw8yjJYNVb38hGOxm5+AnnT8ksk93esEWz10LLgOkHib Lw6I6x55vcB8aqq7zCafixBlY2yV6N0i6clVlm+XbfomPS+0WmULr66VKEOx0XjsKTMY 8AXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=S4Ctg179hvNx+mcqvNvbFl8e+KH7he3Z+aLQxuF3iGU=; b=erTV/OFsoIz9aDuaVjSHG19ctTC5EV1GObgj88VUJx7XexuE1WytOeb40MIcFdClpb 5fKv1XgXVEulg+Wn8bKxfJ9GJm0wddDHGoINJqq8IJpsvEuSUWAP5qRJaKIzNkJPV3qH PRA/8zJ2iN6ptjhTNPeg+pbIKv6SsyHa+sy9Q8u3Yw/l/3paAK6u7iaW4BSSAJ0o8xxi WSKQJN8BcVahbYbEuUAPexxVt4yO1F4JS4XJiRM2b3VsUxsY91x5X94vVR/uZ4tGPi2Y W8DnIb5vFkypXD+85iXYooVW6eH5AfiNzCwXAb2mm6oM+Vh1XAGcHsfj4CTIwgMjouEn cPuw== X-Gm-Message-State: APt69E1Wlq4oG54etBZrwuR6etqxqIMMhG0GuyNn/Ggx8eE1Nv5ShTyG t0llrApWrojU5Nb67sapZja1GjXcOb8= X-Google-Smtp-Source: ADUXVKI5+lz4qhE7lze6DY4WIcSz1E0Y8mcFXAdtqm+xX3x5PpSfEdRKegN8AWfe/KTRALLuZZTbAw== X-Received: by 2002:a6b:3888:: with SMTP id f130-v6mr13554311ioa.279.1529429540707; Tue, 19 Jun 2018 10:32:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: zsh/stat: output atime/mtime/ctime with nanoseconds From: dana In-Reply-To: <20180619141851.GA16101@zira.vinc17.org> Date: Tue, 19 Jun 2018 12:32:19 -0500 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <40B18898-FFE4-4AB6-9146-1DF758878480@dana.is> References: <20180619141851.GA16101@zira.vinc17.org> To: Vincent Lefevre X-Mailer: Apple Mail (2.3445.6.18) On 19 Jun 2018, at 09:18, Vincent Lefevre wrote: >Under Linux, the stat utility from GNU Coreutils outputs >atime/mtime/ctime with nanoseconds. > >IMHO, zsh should do the same. The GNU tools that support nanoseconds in time strings tend to use = Gnulib's nstrftime(), which provides their %N extension to the standard = strftime(3) stuff. zsh has a similar function, ztrftime(), which zsh/stat uses. The first = problem is that the module doesn't pass the file's sub-second time information = to the function, and the second problem is that, even if it did, ztrftime() = only supports microsecond granularity. I think it would be very easy to = change both of those things, but there may be some portability issues with getting = the nanosecond information itself. (Also, not all file systems even record times to the nanosecond =E2=80=94 = HFS+ only has whole-second granularity for example =E2=80=94 but that's another = thing.) If nobody has any objections i might look into this later; there've been = a few times i wanted '%9.' myself. dana