On 10/17/25 2:33 PM, Grisha Levit wrote:

A zero precision just cuts the decimal point and everything following it.
This is what ksh93 does, and consistent with what POSIX interp 267
specified (the TIMEFORMAT part never actually made it into the standard).

I read that but didn't find anything that suggested a precision of 0 be
treated specially w.r.t. rounding. I think this is the relevant part of
the proposed text:

     The optional p is a decimal digit specifying
     the precision, the number of digits after the
     decimal point. A value of 0 shall not display
     the decimal point.

I interpreted a zero precision to mean you don't even look at the fractional part when I invented TIMEFORMAT. This goes back to 1996.
Since POSIX took TIMEFORMAT from bash, I didn't see any reason to change.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to