HomeFreeBSD

date: Improve nanosecond support

Description

date: Improve nanosecond support

Add support for a field width, which defaults to 9 if unspecified or
zero. If the width is not exactly 9, we have to either cut off digits
or append zeroes to make up the difference. If the width is a dash,
we pick a width based on the clock's reported resolution. This brings
us in line with GNU coreutils.

PR: 287080
MFC after: 1 week
Reviewed by: 0mp
Differential Revision: https://reviews.freebsd.org/D53667

Details

Provenance
desAuthored on Nov 11 2025, 2:58 PM
Reviewer
0mp
Differential Revision
D53667: date: Improve nanosecond support
Parents
rGeb95b990f8eb: sound tests: Fix format specified for kevent.data
Branches
Unknown
Tags
Unknown