bug#79113: du --time-styles inconsistencies between manual and behaviour
From:
Nicolas Boichat
Subject:
bug#79113: du --time-styles inconsistencies between manual and behaviour
Date:
Mon, 28 Jul 2025 22:44:21 +0800
Hi,
Version: env du --version => du (GNU coreutils) 9.7
OS: archlinux, x86-64
The GNU coreutils manual says
(https://www.gnu.org/software/coreutils/manual/coreutils.html#index-_002d_002dtime_002dstyle-1):
- "You can specify the default value of the --time-style option with
the environment variable TIME_STYLE; if TIME_STYLE is not set the
default style is ‘long-iso’." -> yes
- "For compatibility with ls, if TIME_STYLE begins with ‘+’ and
contains a newline, the newline and any later characters are ignored;"
That does not match behaviour, newlines are just used as-is:
```
$ env du --time --time-style="$(printf "+xyz\nabc")" blob
96 xyz
abc blob
```
- "if TIME_STYLE begins with ‘posix-’ the ‘posix-’ is ignored; and if
TIME_STYLE is ‘locale’ it is ignored."
Also doesn't match, `posix-` is not allowed, `locale` is not allowed:
```
$ env du --time --time-style=posix-iso blob
du: invalid argument ‘posix-iso’ for ‘time style’
Valid arguments are:
- ‘full-iso’
- ‘long-iso’
- ‘iso’
Try 'du --help' for more information.
$ env du --time --time-style=locale blob
du: invalid argument ‘locale’ for ‘time style’
Valid arguments are:
- ‘full-iso’
- ‘long-iso’
- ‘iso’
Try 'du --help' for more information.
```
Finally, the help text doesn't mention that +FORMAT is allowed.
Thanks!
Nicolas