bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time builtin: incorrect formatting (e.g. 0m28.:00s)


From: Andrew Church
Subject: Re: time builtin: incorrect formatting (e.g. 0m28.:00s)
Date: Mon, 12 Jan 2026 12:17:44 +0900

Nikola Beneš wrote:
>       The colon symbol in `0m28.:00s' seems out of place. It might be
>       some kind of an overflow error because ':' == '9' + 1. I have
>       tried investigating a bit and this line seems quite suspicious:
>
>       
> https://cgit.git.savannah.gnu.org/cgit/bash.git/tree/execute_cmd.c?h=devel#n1358

This is indeed caused by not handling carry from rounding.  It looks like
this was fixed in the devel branch with:

https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/execute_cmd.c?h=devel&id=403b32faf6a5b31ed58a42d1ff696fb8d3d7d5b9

  --Andrew Church
    https://achurch.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]